question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proper ssl/https handling

See original GitHub issue

I am running django-cms from latest development branch:

-e git+https://github.com/divio/django-cms.git@946ac2b3cb1c95827bf879a4c2254331ee185eb3#egg=django_cms-origin/develop

I have big troubles when accessing it via https because many requests seem to be hardcoded to http. For example the “Save” button in the admin interface does not work. It saves the instance, but does not reload/refresh the page because this request is blocked by the browser (wants to load via http, but page was loaded via https). Another example is that cancelling the addition of a plugin (so deleting it) causes errors: it deletes the plugin, but the “popup” stays in the browser and nothing seems to change. When you hit cancel again you understandably get a 404 because the plugin is already gone. You can workaround all this by always manually hitting F5, but this is annoying (and not DAU friendly) 😃 I did not find the places where to fix it, so maybe somebody who’s used to the architecture of djangocms can fix it?

Issue Analytics

  • State:closed
  • Created 10 years ago
  • Comments:21 (21 by maintainers)

github_iconTop GitHub Comments

4reactions
asmapscommented, Mar 5, 2014

Okay I found out how it works. The problem was not that the proxy is on another host, but it has to set a special header. E.g. for nginx you nee this:

proxy_set_header        X-Forwarded-Proto $scheme;

Also you have to put this line in your django settings:

SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

Finally found it in django doc here: https://docs.djangoproject.com/en/dev/topics/security/#ssl-https and here: https://docs.djangoproject.com/en/dev/ref/settings/#std:setting-SECURE_PROXY_SSL_HEADER

Thanks for your help and ideas. Maybe this will help somebody later 😃

0reactions
FinalAngelcommented, Mar 5, 2014

thank you very much for the great addition 👍

Read more comments on GitHub >

github_iconTop Results From Across the Web

What is an SSL Certificate? - DigiCert.com
What is a TLS/SSL Certificate and how does it work? ... TLS certificates are what enable websites to move from HTTP to HTTPS,...
Read more >
Your Complete Guide to SSL/TLS and HTTPS - DreamHost
SSL and TLS are certificates that you can add to your website. They create encrypted connections between browsers and web servers. When you ......
Read more >
SSL and SSL Certificates Explained For Beginners
A complete beginners guide to SSLand SSL certificates. How they work and the different certificate types,encodings and uses.
Read more >
How Does SSL Work? - Entrust
The SSL certificate's job is to initiate secure sessions with the user's browser via the secure sockets layer (SSL) protocol. This secure connection...
Read more >
The Complete Guide To Switching From HTTP To HTTPS
You will be presented with the "Install an SSL Website" form. Click the "Browse Certificates" button and select your HTTPS certificate. Select ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found