web: Use guessAppRootOr to enable relative root if desired (fix #2099)
This is useful when serving on 0.0.0.0, such that querying from any other device with <IP>:<PORT> does not fallback to 0.0.0.0:PORT, which would fail. Tested: Manually
This commit is contained in:
parent
edeb906922
commit
6312446cbf
@ -96,7 +96,7 @@ type Form a = Html -> MForm Handler (FormResult a, Widget)
|
|||||||
-- Please see the documentation for the Yesod typeclass. There are a number
|
-- Please see the documentation for the Yesod typeclass. There are a number
|
||||||
-- of settings which can be configured by overriding methods here.
|
-- of settings which can be configured by overriding methods here.
|
||||||
instance Yesod App where
|
instance Yesod App where
|
||||||
approot = ApprootMaster $ appRoot . settings
|
approot = guessApprootOr (ApprootMaster $ appRoot . settings)
|
||||||
|
|
||||||
makeSessionBackend _ = do
|
makeSessionBackend _ = do
|
||||||
hledgerdata <- getXdgDirectory XdgCache "hledger"
|
hledgerdata <- getXdgDirectory XdgCache "hledger"
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user