Skip to content

Commit

Permalink
Merge pull request #8 from Creoox/develop
Browse files Browse the repository at this point in the history
Bugfix: /_oauth/token endpoint when no x-forwarded-uri header
  • Loading branch information
and-ratajski authored Apr 26, 2023
2 parents 7a341cb + 91dd63a commit 9e3ec5f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion app/.env.example
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Application settings
APP_NAME=cx-traefik-forward-auth
APP_VERSION=1.1.1
APP_VERSION=1.1.2
APP_PORT=4181

## Environment settings
Expand Down
3 changes: 2 additions & 1 deletion app/src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,9 @@ app.get(
// Additional feature -> browser-based login
else if (LOGIN_WHEN_NO_TOKEN) {
const isAuthCallback =
!!req.headers["x-forwarded-uri"] &&
(req.headers["x-forwarded-uri"] as string).split("?")[0] ===
AUTH_ENDPOINT;
AUTH_ENDPOINT;
if (isAuthCallback) {
req.url = req.headers["x-forwarded-uri"] as string;
return handleCallback(req, res, next);
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ services:
# - ./app:/app # Uncomment for hot-reload, development only
# - ./app/logs/error.log:/app/logs/error.log # Uncomment for logs binding, production
ports:
- 4181:${APP_PORT}
- 80:${APP_PORT}

0 comments on commit 9e3ec5f

Please sign in to comment.