From 631059be6962ce46bacda95d3dfa65b769261d1b Mon Sep 17 00:00:00 2001 From: Stavros Date: Sun, 9 Mar 2025 18:41:20 +0200 Subject: [PATCH] refactor: rename x-tinyauth-user to remote-user --- docker-compose.dev.yml | 2 +- docker-compose.example.yml | 2 +- internal/api/api.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/docker-compose.dev.yml b/docker-compose.dev.yml index e17e92b..f550606 100644 --- a/docker-compose.dev.yml +++ b/docker-compose.dev.yml @@ -31,4 +31,4 @@ services: traefik.http.routers.tinyauth.rule: Host(`tinyauth.dev.local`) traefik.http.services.tinyauth.loadbalancer.server.port: 3000 traefik.http.middlewares.tinyauth.forwardauth.address: http://tinyauth:3000/api/auth/traefik - traefik.http.middlewares.tinyauth.forwardauth.authResponseHeaders: X-Tinyauth-User + traefik.http.middlewares.tinyauth.forwardauth.authResponseHeaders: Remote-User diff --git a/docker-compose.example.yml b/docker-compose.example.yml index 03c3a60..6af3925 100644 --- a/docker-compose.example.yml +++ b/docker-compose.example.yml @@ -29,4 +29,4 @@ services: traefik.http.routers.tinyauth.rule: Host(`tinyauth.example.com`) traefik.http.services.tinyauth.loadbalancer.server.port: 3000 traefik.http.middlewares.tinyauth.forwardauth.address: http://tinyauth:3000/api/auth/traefik - traefik.http.middlewares.tinyauth.forwardauth.authResponseHeaders: X-Tinyauth-User + traefik.http.middlewares.tinyauth.forwardauth.authResponseHeaders: Remote-User diff --git a/internal/api/api.go b/internal/api/api.go index 64bcd69..908bed0 100644 --- a/internal/api/api.go +++ b/internal/api/api.go @@ -237,7 +237,7 @@ func (api *API) SetupRoutes() { } // Set the user header - c.Header("X-Tinyauth-User", userContext.Username) + c.Header("Remote-User", userContext.Username) // The user is allowed to access the app c.JSON(200, gin.H{