Skip to content

Commit

Permalink
restrict ui iframes
Browse files Browse the repository at this point in the history
  • Loading branch information
jonschoning committed Oct 9, 2021
1 parent ba56d5c commit a080c30
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Foundation.hs
Expand Up @@ -67,14 +67,14 @@ instance Yesod App where
else id

yesodMiddleware :: HandlerFor App res -> HandlerFor App res
yesodMiddleware = maybeSSLOnly . defaultYesodMiddleware . defaultCsrfMiddleware
yesodMiddleware = customMiddleware . defaultYesodMiddleware . defaultCsrfMiddleware
where
maybeSSLOnly handler = do
customMiddleware handler = do
addHeader "X-Frame-Options" "DENY"
yesod <- getYesod
(if appSSLOnly (appSettings yesod)
then sslOnlyMiddleware session_timeout_minutes
else id)
handler
else id) handler

defaultLayout widget = do
req <- getRequest
Expand Down

0 comments on commit a080c30

Please sign in to comment.