I try to use it as development tool, But HTTPS is not supported.
myproxy host prepaths = do
rq <- S.askRq
let rq1 = rq { S.rqHeaders=S.setHeader "host" host $ S.rqHeaders rq
, S.rqPaths = prepaths ++ S.rqPaths rq
, S.rqSecure = True
}
liftIO $ putStrLn $ show $ rq1
liftIO (S.getResponse rq1) >>= either (S.badGateway . S.toResponse . show) return
....
S.dir "xxx" $ myproxy "xxx.com" ["xxx"]
Nginx throw:
The plain HTTP request was sent to HTTPS port