coder
asked on
ssl error - You're accessing the development server over HTTPS, but it only supports HTTP
Hi Experts
I am working on a wagtail project(like django-cms) I get this error when I run python3 manage.py runserver 0.0.0.0:8000
I had changed SECURE_SSL_REDIRECT=FALSE and tested it still i get this same error. I had disabled cache in chrome.
I had deactivated chorme caching in registry by following steps.
Deactivate Chrome Cache in the Registry
Open Registry (Start -> Command -> Regedit)
Search for: HKEY_CLASSES_ROOT\ChromeHT ML\shell\o pen\comman d
Change the part after ...chrom.exe" to this value: –disable-application- cache –media-cache-size=1 –disk-cache-size=1 — "%1"
Example: "C:\Program Files (x86)\Google\Chrome\Applic ation\chro me.exe" - disable-application-cache –media-cache-size=1 –disk-cache-size=1 — "%1"
I had also tried disable cache from chrome developer tools network -disable cache.
I had also tried by clearing cache from hsts on chrome.
I had also tried from incognito window on chrome. But still I get the same error
It is an Ubuntu machine on AWS(accessed by putty from windows pc).
I access from outside (windows pc - local pc )through http://54.23x.9x.17:8000 I am not able to resolve this error.
I had tried on some other machine. I got the following error on console for Linux Ubuntu
it is changing to https instead of http and I got "GET / HTTP/1.1" 301 0 on console window
Please help me in resolving this error.
With Many Thanks, Bharath AK
I am working on a wagtail project(like django-cms) I get this error when I run python3 manage.py runserver 0.0.0.0:8000
code 400, message Bad request syntax
('\x16\x03\x01\x00®\x01\x00\x00ª\x03\x03³\x06âP\x97Þ%<Sg\x13Ö×[zE\x96\x15?
\x96\x00\x1ah')
You're accessing the development server over HTTPS, but it only supports
HTTP.
I had changed SECURE_SSL_REDIRECT=FALSE and tested it still i get this same error. I had disabled cache in chrome.
I had deactivated chorme caching in registry by following steps.
Deactivate Chrome Cache in the Registry
Open Registry (Start -> Command -> Regedit)
Search for: HKEY_CLASSES_ROOT\ChromeHT
Change the part after ...chrom.exe" to this value: –disable-application- cache –media-cache-size=1 –disk-cache-size=1 — "%1"
Example: "C:\Program Files (x86)\Google\Chrome\Applic
I had also tried disable cache from chrome developer tools network -disable cache.
I had also tried by clearing cache from hsts on chrome.
I had also tried from incognito window on chrome. But still I get the same error
It is an Ubuntu machine on AWS(accessed by putty from windows pc).
I access from outside (windows pc - local pc )through http://54.23x.9x.17:8000 I am not able to resolve this error.
I had tried on some other machine. I got the following error on console for Linux Ubuntu
it is changing to https instead of http and I got "GET / HTTP/1.1" 301 0 on console window
Please help me in resolving this error.
With Many Thanks, Bharath AK
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi All,
Thank you so much, my thinking was to use only browser to check http calls. From you suggestions, I realized I can do all http tasks in curl, wget and postman. Thanks for your ideas. It is really helpful to me
Kind Regards,
Bharath AK
Thank you so much, my thinking was to use only browser to check http calls. From you suggestions, I realized I can do all http tasks in curl, wget and postman. Thanks for your ideas. It is really helpful to me
Kind Regards,
Bharath AK
ASKER
Hi All,
The following lines of code in settings.py is causing the ssl error. Once I commented the below lines. the error vanished. I dont know exactly which line was causing the error. Once I comment this out, ssl error vanished.
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_HSTS_INCLUDE_SUBDOM AINS = True
SECURE_HSTS_SECONDS = 86400
SECURE_CONTENT_TYPE_NOSNIF F = True
SECURE_BROWSER_XSS_FILTER = True
With many thanks,
Bharath AK
The following lines of code in settings.py is causing the ssl error. Once I commented the below lines. the error vanished. I dont know exactly which line was causing the error. Once I comment this out, ssl error vanished.
SECURE_SSL_REDIRECT = True
SESSION_COOKIE_SECURE = True
CSRF_COOKIE_SECURE = True
SECURE_HSTS_INCLUDE_SUBDOM
SECURE_HSTS_SECONDS = 86400
SECURE_CONTENT_TYPE_NOSNIF
SECURE_BROWSER_XSS_FILTER = True
With many thanks,
Bharath AK
ASKER
I am able to see the application from the browser.
Steps I had done is do http get from postman for http://54.25x.9x.17:8000, It was throwing few errors on postman.
Like missing environmental variables like creating facebook-id and providing search path etc. Once I set the environment variables
It succeeding with 200 ok on postman. Then I was able to see the application from incognito window on chrome.
Later it started working on normal window and disable cache on network tab with developer tools on chrome.
With Many Thanks,
Bharath AK