Skip to content

Commit

Permalink
dvproxy header setting
Browse files Browse the repository at this point in the history
  • Loading branch information
ErykKul committed Sep 22, 2024
1 parent 41a6a35 commit fb83445
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion authn-env/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@ REGISTRY=docker.io
DATAVERSE_SERVER=https://beta.dataverse.org
API_KEY=secret_api_key
UNBLOCK_KEY=secret_unblock_key
USER_HEADER=user
USER_HEADER=X-Forwarded-Preferred-Username
3 changes: 2 additions & 1 deletion authn-env/docker-compose-keycloak.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@
# Or:
# make keycloak-<command> (eg. make keycloak-up, make keycloak-down)
#
# Access http://oauth2-proxy.localtest.me:4180/spa to initiate a login cycle using [email protected], password=password
# Access SPA http://oauth2-proxy.localtest.me:4180/spa to initiate a login cycle using [email protected], password=password
# Access API http://oauth2-proxy.localtest.me:4180/api/users/:me
# Access http://keycloak.localtest.me:9080 with the same credentials to check out the settings
services:
oauth2-proxy:
Expand Down
1 change: 0 additions & 1 deletion authn-env/dvproxy/app/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ func main() {

func handle(w http.ResponseWriter, r *http.Request) {
client := api.NewClient(dataverseServer)
fmt.Println(r.Header)
client.User = r.Header.Get(userHeader)
client.AdminApiKey = apiKey
client.UnblockKey = unblockKey
Expand Down
2 changes: 1 addition & 1 deletion authn-env/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ http {
server_name localhost;

location / {
proxy_pass http://dataverse:8080;
proxy_pass http://dvproxy:8080;
}

location /spa {
Expand Down

0 comments on commit fb83445

Please sign in to comment.