Skip to content

Conversation

@williamomeara
Copy link

  • Replace all request.scope.get("root_path", "") with settings.app_root_path
  • Add trailing slashes to redirect URLs to avoid unnecessary 307 redirects
  • Add settings import to llm_admin_router.py

Files affected:

  • mcpgateway/admin.py (76 occurrences)
  • mcpgateway/utils/verify_credentials.py (3 occurrences)
  • mcpgateway/routers/sso.py (1 occurrence)
  • mcpgateway/routers/oauth_router.py (1 occurrence)
  • mcpgateway/routers/llm_admin_router.py (5 occurrences)

Closes #1588

📝 Pull Request Template Selection

Thank you for contributing! To help us review your pull request effectively, please select the appropriate template (go to the Preview tab and select the appropriate sub-template):

Alternatively, after opening your pull request, you can choose the appropriate template from the "Choose a template" dropdown menu located at the top-right of the description box.

If none of the above templates fit your changes, feel free to provide a clear and concise description of your pull request below.

- Replace all `request.scope.get("root_path", "")` with `settings.app_root_path`
- Add trailing slashes to redirect URLs to avoid unnecessary 307 redirects
- Add settings import to llm_admin_router.py

Files affected:
- mcpgateway/admin.py (76 occurrences)
- mcpgateway/utils/verify_credentials.py (3 occurrences)
- mcpgateway/routers/sso.py (1 occurrence)
- mcpgateway/routers/oauth_router.py (1 occurrence)
- mcpgateway/routers/llm_admin_router.py (5 occurrences)

Closes IBM#1588

Signed-off-by: William <you@example.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

refactor: Standardize root_path access pattern across codebase

1 participant