-
Notifications
You must be signed in to change notification settings - Fork 189
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
Unable to access params array when running behind nginx reverse proxy with ssl #145
Comments
@ksteimel Thanks! Do you have a Dockerfile or something so I can replicate the environment (I'm on mac). |
I don't have a dockerfile preapred :/ I was using lxc containers to isolate it. Do you need a container for both nginx and the app or for just the app? |
OK, don't worry - I have it on my TODO list to make a Dockerfile for Genie apps (Julia, Nginx proxy, SQLite, Postgres, Redis, Memcache, etc). This looks like a good time to do it - but it will take a bit longer to set it up. |
Sorry! Let me know if I can help. I'm decently competent with Docker. |
@ksteimel If you have the time and are happy to contribute a docker image for Genie users, that would be amazing. It's something we needed/wanted for a long time and we'd push it the way to install the full stack. In terms of spec, must haves are:
Really good to have:
Nice to have:
Anything else? Utilities for logging error, other interesting monitoring tools for when running in production, etc? What do you think? Maybe we can start with an image for web dev and modify it for Julia? |
#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;} Hmm do you think it makes more sense to put all of that in a single docker or use a docker-compose? Thank you, Kenneth Steimel Associate Instructor Indiana University From: [email protected]: June 20, 2019 10:24 AMTo: [email protected]: [email protected]: [email protected]; [email protected]: Re: [GenieFramework/Genie.jl] Unable to access params array when running behind nginx reverse proxy with ssl (#145) @ksteimel If you have the time and are happy to contribute a docker image for Genie users, that would be amazing. It's something we needed/wanted for a long time and we'd push it the way to install the full stack.
In terms of spec, must haves are:
Julia 1.1.xSQLite [for dev]Postgres [for prod]Nginx - on port 80 configured as a reverse proxy for the Genie apps running on 8080 and SSL (Let's encrypt)Supervisord to start Genie apps as services (and autostart on crash)Nodejs [for asset management]based off Ubuntu?
Really good to have:
some control panel to manage services (maybe https://cockpit-project.org or similar?)
Nice to have:
Memcache [for caching and/or session storage]Redis [for caching and/or session storage]MySQL [for dev / prod]
Anything else? Utilities for logging error, other interesting monitoring tools for when running in production, etc?
What do you think? Maybe we can start with an image for web dev and modify it for Julia?
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or mute the thread.
|
@ksteimel Sorry, didn't have time to look into this till now. I've never used docker-compose but I checked it out now and it looks great. |
Hi Genie, |
@Ankur-deDev Thanks - can you please show a dump of the headers? Like the full request maybe? I presume proxying messes up with the headers... dump(@params(:REQUEST)) And maybe the same for the full Thanks |
#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;} Oh yeah I forgot I found a work around for this. The values are in rawpayload if running behind an ssl enable nginx reverse proxy. You can then run `URIParser.query_params(rawpayload())` To get the resulting dict (with the exception that the keys are now strings). From: [email protected]: November 14, 2019 3:33 AMTo: [email protected]: [email protected]: [email protected]; [email protected]: [External] Re: [GenieFramework/Genie.jl] Unable to access params array when running behind nginx reverse proxy with ssl (#145) This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.@Ankur-deDev Thanks - can you please show a dump of the headers? Like the full request maybe? I presume proxying messes up with the headers...
dump(@params(:REQUEST))
And maybe the same for the full @params object?
Thanks
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
@ksteimel Thanks for letting me know! If you can pass me the rawpayload maybe I can make a generic fix. |
This is what I had in my logs for the output of
|
Hmm... I wonder if it's a content type issue. Do you explicitly set the content type of the form? Ie |
#response_container_BBPPID{font-family: initial; font-size:initial; color: initial;} I do not. Haha. Do you want me to try that and see what happens? I can once I get off work. From: [email protected]: November 14, 2019 10:20 AMTo: [email protected]: [email protected]: [email protected]; [email protected]: [External] Re: [GenieFramework/Genie.jl] Unable to access params array when running behind nginx reverse proxy with ssl (#145) This message was sent from a non-IU address. Please exercise caution when clicking links or opening attachments from external sources.Hmm... I wonder if it's a content type issue. Do you explicitly set the content type of the form? Ie application/x-www-form-urlencoded or multipart/form-data?
—You are receiving this because you were mentioned.Reply to this email directly, view it on GitHub, or unsubscribe.
|
Yes please, if you can :) |
Sorry for the delay, setting |
Bummer - probably easy to solve if |
Solved! |
Describe the bug
elements in
@params
are not accessible after form submission for genie app running behind nginx reverse proxy with ssl enabled. Using ssh port forwarding directly to app works flawlessly and elements of@params
are accessible.To Reproduce
@params
is accessed by function receiving post action (simply printing will work)KeyError
is raised for the element in@params
you were trying to accessExpected behavior
The element in
@params
should be accessible as it is when not behind the nginx reverse proxy.Additional context
julia> versioninfo()
pkg> st
Nginx reverse proxy config
Note that app is configured to start on port 2112
The app I'm running can be found here
The text was updated successfully, but these errors were encountered: