Skip to content
Discussion options

You must be logged in to vote

Thank you @code-asher, I was able to figure this out.

This setup will require all requests going thru Code Server's IP to enter the password but when going thru the reverse proxy (NGINX via SWAG in my case) to be authenticated automagically using the code-server-session cookie.

I protect my reverse proxy via Authelia, so my app is still protected.

Instructions

  1. Set your HASHED_PASSWORD for Code Server

Tip: You can use Vault Warden's built in hash command and it works for code-server docker exec -it vwcontainer /vaultwarden hash

  1. Create a directive to store your hash in NGINX
geo $codehash {
    default "hashwithdollarsigns";
}

Note: NGINX does not support escaping $ so you have to u…

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@code-asher
Comment options

@MickMorley
Comment options

@code-asher
Comment options

@MickMorley
Comment options

Answer selected by MickMorley
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants