Skip to content
Permalink
Browse files
restrict ui iframes
  • Loading branch information
jonschoning committed Oct 9, 2021
1 parent ba56d5c commit a080c3017aedd22c2c71bd086c39739b72eb85f5
Showing with 4 additions and 4 deletions.
  1. +4 −4 src/Foundation.hs
@@ -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

0 comments on commit a080c30

Please sign in to comment.