Redirect to HTTPS
See original GitHub issueDescribe the bug:
Redirect the URL to HTTPS
Screenshots:
Solution:
Add the following to the settings.py
file, adding the middleware to your existing MIDDLEWARE list if one exists.
MIDDLEWARE = [
# SecurityMiddleware must be listed before other middleware
'django.middleware.security.SecurityMiddleware',
# ...
]
if not DEBUG: # When we are in production ( DEBUG = False ), the URL will redirect to HTTPS
SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')
SECURE_SSL_REDIRECT = True
Source:
Issue Analytics
- State:
- Created 2 years ago
- Comments:6 (3 by maintainers)
Top Results From Across the Web
How to Redirect Website from HTTP to HTTPS? - Geekflare
Go to Page Rules · Click “Create Page Rule” · Enter the URL (put the asterisk, so redirection happens for all the URI)...
Read more >How to redirect all HTTP requests to HTTPS using .htaccess ...
If you want to redirect your users to HTTPS at all times, send them there from the "entry point" (the first link to...
Read more >Force your site to redirect to HTTPS (SSL)
If your site requires custom code to force the redirect to HTTPS, you will need to update a configuration file for your domain...
Read more >IIS Redirect HTTP to HTTPS - SSL Certificates - Namecheap
Setting up an HTTP/HTTPS redirect in IIS · Download and install the URL Rewrite module. · Click Add Rule(s) in the right-side menu....
Read more >How to Redirect HTTP to HTTPS - Semrush
Download the IIS URL Rewrite Module; Go into IIS Manager and select the website that needs redirecting; Select URL Rewrite; Click Add Rules, ......
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I can take up this work @PraveenMalethia
Okay, thanks for the update.