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.

Enabling channels breaks `FORCE_SCRIPT_NAME`

See original GitHub issue

Hi all!

Today I suddenly figured out that enabling Channels breaks URL “routing” inside Django Admin when FORCE_SCRIPT_NAME is set. I have Django running behind Nginx reverse proxy with /api/ URL prefix. To make Django respect this prefix I set FORCE_SCRIPT_NAME = '/api' in the Django setting file. Everything works fine until I enable Channels by INSTALLED_APPS += ['channels']. After this Django Admin login screen POSTs data the wrong URL, the one without /api/ prefix. If I disable Channels it works fine again. I simply do not know where to dig further. Any help is appreciated.

My setup:

  • channels (2.1.0)
  • daphne (2.1.0)
  • Django (2.0.4)
  • Ubuntu Linux 16.04

Issue Analytics

  • State:closed
  • Created 5 years ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

2reactions
maribedrancommented, May 26, 2018

Hey! I’m at the DjangoCon EU sprints. I’m working on this issue.

0reactions
andrewgodwincommented, May 26, 2018

Looks lovely - thanks for your work on that!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Settings - Django documentation
The CACHES setting must configure a default cache; any number of ... who should get broken link notifications when BrokenLinkEmailsMiddleware is enabled.
Read more >
Untitled
Tv news themes collection, R pur aloe, Record 147 break, Corsair tx650 v2, Pure gym putney ... Mucous retention cyst symptoms, Al jazeera...
Read more >
sitemap-questions-141.xml - Stack Overflow
... https://stackoverflow.com/questions/1799284/how-to-break-exit-from-a-each- ... com/questions/2731419/what-does-enabling-stl-iterator-debugging-really-do ...
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