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.

Use nginx as a reverse proxy

See original GitHub issue

I’m reluctant to include nginx as a dependency, but twisted is simply not powerful enough. It can’t set the X-Forwaded-Host header, so when Flask redirects to a different URL, it doesn’t know the host or protocol which the client used to initiate the request.

I’ll try to not make it a mandatory dependency, such that everything runs without. However, SSL likely won’t work. This must be why everyone discourages the use of SSL with Flask directly. Not a production server, and so on…

Issue Analytics

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

github_iconTop GitHub Comments

1reaction
AdrianVollmercommented, Jun 15, 2019

Yeah so the stackexchange post was about proxies, not reverse proxies. It was much easier to add headers in a reverse proxy.

Also, what a disgrace it is to only have SSLv3 and TLS1.0 available by default in 2019… on a client:

PS C:\Users\avollmer> [Net.ServicePointManager]::SecurityProtocol
Ssl3, Tls
PS C:\Users\avollmer> [Net.ServicePointManager]::SecurityProtocol = `
>>     [Net.SecurityProtocolType]::Tls12,
>>     [Net.SecurityProtocolType]::Tls11 ;
PS C:\Users\avollmer> [Net.ServicePointManager]::SecurityProtocol
Tls11, Tls12
PS C:\Users\avollmer> get-date

Samstag, 15. Juni 2019 08:27:17
1reaction
AdrianVollmercommented, Jun 10, 2019

I did it so at least the webapp is usable again. I’ll leave this open until we have a decision

Read more comments on GitHub >

github_iconTop Results From Across the Web

NGINX Reverse Proxy
Configure NGINX as a reverse proxy for HTTP and other protocols, with support for modifying request headers and fine-tuned buffering of responses.
Read more >
How to Set up & Use NGINX as a Reverse Proxy - phoenixNAP
Step 1: Install Nginx from Default Repositories · Step 2 (optional): Install Nginx from Official Repository · Step 3: Start Nginx and Configure...
Read more >
How To Configure Nginx as a Reverse Proxy on Ubuntu 22.04
This tutorial will demonstrate how to set up a reverse proxy using Nginx, a popular web server and reverse proxy solution.
Read more >
How to Set Up an Nginx Reverse Proxy - Hostinger
1. Install Nginx. We'll be using the apt command on Ubuntu 18.04: · 2. Disable the Default Virtual Host. Once you have installed...
Read more >
How To Set Up a Reverse Proxy (Step-By-Step for Nginx ...
Nginx is an open source web server that can also serve as a reverse proxy. Apart from being used to host websites, it's...
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