packages feed

yesod-bin 1.4.15 → 1.4.16

raw patch · 3 files changed

+15/−5 lines, 3 files

Files

ChangeLog.md view
@@ -1,3 +1,7 @@+## 1.4.16++* Some updates for better reverse proxying [yesod-scaffold#114](https://github.com/yesodweb/yesod-scaffold/issues/114)+ ## 1.4.15  * Deprecate yesod init
Devel.hs view
@@ -188,14 +188,20 @@           let cert = $(embedFile "certificate.pem")               key = $(embedFile "key.pem")               tlsSettings = tlsSettingsMemory cert key-          runTLS tlsSettings (setPort port defaultSettings) app+          runTLS tlsSettings (setPort port defaultSettings) $ \req send -> do+            let req' = req+                    { requestHeaders+                        = ("X-Forwarded-Proto", "https")+                        : requestHeaders req+                    }+            app req' send         httpProxy = run (develPort opts) proxyApp         httpsProxy = runProxyTls (develTlsPort opts) proxyApp     putStrLn "Application can be accessed at:\n"-    putStrLn $ "http://127.0.0.1:" ++ show (develPort opts)-    putStrLn $ "https://127.0.0.1:" ++ show (develTlsPort opts)+    putStrLn $ "http://localhost:" ++ show (develPort opts)+    putStrLn $ "https://localhost:" ++ show (develTlsPort opts)     putStrLn $ "If you wish to test https capabilities, you should set the following variable:"-    putStrLn $ "  export APPROOT=https://127.0.0.1:" ++ show (develTlsPort opts)+    putStrLn $ "  export APPROOT=https://localhost:" ++ show (develTlsPort opts)     putStrLn ""     loop (race_ httpProxy httpsProxy) `Ex.catch` \e -> do         print (e :: Ex.SomeException)
yesod-bin.cabal view
@@ -1,5 +1,5 @@ name:            yesod-bin-version:         1.4.15+version:         1.4.16 license:         MIT license-file:    LICENSE author:          Michael Snoyman <michael@snoyman.com>