Skip to content

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

@ghost

Description

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions