Skip to content
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

Handling of the ServerName option might lead to unwanted results #51

Open
ghost opened this issue Feb 17, 2016 · 0 comments
Open

Handling of the ServerName option might lead to unwanted results #51

ghost opened this issue Feb 17, 2016 · 0 comments

Comments

@ghost
Copy link

ghost commented Feb 17, 2016

I already discussed this with @bastelfreak and thought I would document it here just to be sure. On my first attempt to setup marmoset I ran into an problem with the ServerName option in the configuration which took quite some time to get around.

Currently the "ServerName" from the configuration is used to set the 'SERVER_NAME' in the flask application. In my tests this resulted in a situation where marmoset would only ever route requests with the exact hostname/IP and port configuration and any other combination would trigger a 404 "Route not found". While it certainly is desirable to be able to set the ServerName in such a manner in some cases, there are others where you would not want to use it (e.g. have marmoset listen on all interfaces and make requests on all of them). My suggestion therefore would be to check if "ServerName" is empty and only set 'SERVER_NAME' in the flask application if it is not. This way you cold enforce the use of a specific IP/hostname and Port combination if desired or just rely on "Host" and "Port" for the configuration. This is of course unless I am missing something and the 'SERVER_NAME' setting is absolutely needed in any case.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

0 participants