Commit 551a395
fix: improve Grafana login routing by checking Referer header
The /login handler now checks both the redirectTo query parameter
and the Referer header to properly detect Grafana login requests.
This fixes the 405 Method Not Allowed error when logging into
Grafana through the dashboard at /monitoring.
Previous behavior:
- Only checked redirectTo query parameter with "goto" string
- POST requests from Grafana login form don't include this parameter
- Requests were incorrectly routed to ChatUI which returns 405
New behavior:
- Checks redirectTo parameter (for GET requests)
- Checks Referer header for "/embedded/grafana" or "/monitoring"
- Properly routes both GET and POST Grafana login requests
Tested with:
- Direct Grafana access: https://grafana-vllm-semantic-router-system.apps.cluster-hw4mm.hw4mm.sandbox590.opentlc.com (working)
- Dashboard Grafana access: https://dashboard-vllm-semantic-router-system.apps.cluster-hw4mm.hw4mm.sandbox590.opentlc.com/monitoring (now working)
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude <[email protected]>1 parent 725d7fa commit 551a395
1 file changed
+11
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
201 | 201 | | |
202 | 202 | | |
203 | 203 | | |
204 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
205 | 207 | | |
206 | | - | |
207 | | - | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
208 | 216 | | |
209 | 217 | | |
210 | 218 | | |
| |||
0 commit comments