-
-
Notifications
You must be signed in to change notification settings - Fork 608
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pass $ssl_client_s_dn to flask app #103
Comments
Apparently for some reason |
So what resolves the issue for me is to add the following #!/usr/bin/env bash
ex -sc '%s/include uwsgi_params;/include uwsgi_params; uwsgi_param SSL_CLIENT_S_DN $ssl_client_s_dn;/g|x' /etc/nginx/conf.d/nginx.conf |
Sorry for the delay! I was busy building FastAPI. I understand you solved your problem, but anyway... What are you trying to achieve? If you want to have HTTPS, I recommend using Traefik, it can acquire free Let's Encrypt certificates for your application. You can deploy a Docker Swarm cluster with an HTTPS handling Traefik following this guide. And then you can use a project generator to create the basic code structure to connect with Traefik, and add all the rest of your code to it (or add the parts you need to your code). I just added the relevant info and links to the README: https://github.com/tiangolo/uwsgi-nginx-flask-docker#project-generators |
Thanks, I'll take a look at Traefik. |
I just added tests for all the images and configurations to be able to re-factorize knowing that I'm not breaking anything. I'm planning on:
That would allow you to customize the Do you think that would support your use case/need? |
Yes, that would be great. |
Done! ✔️ I just finished a big refactor to be able to add this feature on top. You can now add a file You can check the docs here: https://github.com/tiangolo/uwsgi-nginx-flask-docker#overriding-nginx-configuration-completely |
My nginx.conf file looks like this:
I want my Flask app to receive the
HTTP_X_DN
parameter, but cannot find how.From looking around, I found its expected to reside in
request.environ
object offlask
, but I don't see any such key when printing theenviron
content.For reference,
request.environ.keys())
returns the following when sending a request via Postman:The text was updated successfully, but these errors were encountered: