Skip to content
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

PB-1454: Disable ApiGatewayMiddleware for API calls #519

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

msom
Copy link
Contributor

@msom msom commented Feb 20, 2025

ApiGatewayMiddleware creates a new session for every valid header it finds, which allows admin UI users to login by providing once a valid header and then subsequently only the session cookie.

For API request, authentication is done by ApiGatewayAuthentication, but ApiGatewayMiddleware still runs on every request and creates therefore a new session with every API request (with a valid header).

This PR disables ApiGatewayMiddleware for all API calls (/api/stac/v) and therefore session creation for API calls with the new authentication.

Copy link
Member

@adk-swisstopo adk-swisstopo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wonder whether that should also be guarded by a feature flag.

@msom
Copy link
Contributor Author

msom commented Feb 20, 2025

I wonder whether that should also be guarded by a feature flag.

More likely a bug flag...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants