You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Running without a separate user content instance requires abuse of command line options. #1471
I wish to run a local instance of a Hackage server. This is a trusted environment, so I see no need for a separate user content instance.
However, the flags required-base-host-header and user-content-uri are required.
Moreover, when they are set all to the same value, say localhost:1024, any request to user content will result in an infinite 301 redirect due to the logic of the function Distribution.Server.Framework.ServerEnv.requireUserContent.
This problem can be overcome by setting required-base-host-header to a nonsensical value. Any string other than the true base host header would do.
I think this should be re-designed. Either the problematic options should be made optional, or an equality check should be added to the problematic logic.
However, setting a nonsensical required-base-host-header breaks other resources. So, I am going to hack on the source code and tear this particular piece away, for now.
Activity
kindaro commentedon Mar 11, 2026
However, setting a nonsensical
required-base-host-headerbreaks other resources. So, I am going to hack on the source code and tear this particular piece away, for now.