mirror of
https://github.com/dkmstr/openuds.git
synced 2025-01-24 02:04:09 +03:00
Changed redirection from redirect to permanent redirect on HTTP use
This commit is contained in:
parent
59d578f292
commit
321255a1b0
@ -29,7 +29,7 @@ import logging
|
||||
import typing
|
||||
|
||||
from django.urls import reverse
|
||||
from django.http import HttpResponseRedirect
|
||||
from django.http import HttpResponsePermanentRedirect
|
||||
from uds.core.util.config import GlobalConfig
|
||||
|
||||
logger = logging.getLogger(__name__)
|
||||
@ -86,7 +86,7 @@ class RedirectMiddleware:
|
||||
url = request.build_absolute_uri(full_path)
|
||||
url = url.replace('http://', 'https://')
|
||||
|
||||
return HttpResponseRedirect(url)
|
||||
return HttpResponsePermanentRedirect(url)
|
||||
return self.get_response(request)
|
||||
|
||||
@staticmethod
|
||||
|
Loading…
x
Reference in New Issue
Block a user