Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getResponse don't support proxy of https ? #50

Open
diqye opened this issue Dec 27, 2018 · 0 comments
Open

getResponse don't support proxy of https ? #50

diqye opened this issue Dec 27, 2018 · 0 comments

Comments

@diqye
Copy link

diqye commented Dec 27, 2018

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant