Skip to content

Logging in not inheriting the https protocol from the request #1233

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

Closed
TobiaszCudnik opened this issue Dec 19, 2019 · 4 comments · Fixed by #1338
Closed

Logging in not inheriting the https protocol from the request #1233

TobiaszCudnik opened this issue Dec 19, 2019 · 4 comments · Fixed by #1338
Assignees
Labels
bug Something isn't working

Comments

@TobiaszCudnik
Copy link

  • code-server version: 2.1692-vsc1.39.2
  • OS Version: ubuntu, scaleway

Description

When tunneling default 8080 to an SSL endpoint, after logging in (via https) the app redirs to http. Have to manually type https to make it work.

Steps to Reproduce

  1. Start the server with defaults
  2. Create an SSL-only tunnel using ngrok
    ngrok http -bind-tls=true 8080
  3. Log in

Expected: redir keeps https as the protocol

Result: redir changes the protocol to http (which is not served and results in a blank page)

@TobiaszCudnik TobiaszCudnik added the bug Something isn't working label Dec 19, 2019
@sr229
Copy link
Contributor

sr229 commented Dec 19, 2019

This is by design as your server is not HTTP/S from the start, you should tell the proxy server to redirect all traffic to HTTP/S (which I think is not possible in ngrok).

@sr229 sr229 added question and removed bug Something isn't working labels Dec 19, 2019
@TobiaszCudnik
Copy link
Author

TobiaszCudnik commented Dec 19, 2019

In theory I could create another http-only tunnel under the same address which redirs everything to https.

Wouldnt it be much easier if your post-login redir used an inherited protocol schema ://whatever instead of http://whatever? That way you'd never switch protocols.

Thanks anyway, I love this project :)

@sr229
Copy link
Contributor

sr229 commented Dec 20, 2019

In theory I could create another http-only tunnel under the same address which redirs everything to https.

Wouldnt it be much easier if your post-login redir use an inherited protocol schema ://whatever instead of http://whatever? That way you'd never switch protocols.

Thanks anyway, I love this project :)

Yes.

@nhooyr
Copy link
Contributor

nhooyr commented Jan 27, 2020

Asher will take care of this.

@nhooyr nhooyr added bug Something isn't working and removed question labels Jan 27, 2020
@code-asher code-asher mentioned this issue Feb 10, 2020
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants