Commit ee5e3d2
committed
fix: remove Content-Type header from GET requests in OAuth metadata discovery
GET requests to /.well-known/oauth-authorization-server should not
include a Content-Type header. Some authorization servers (e.g. Keycloak)
respond with 415 Unsupported Media Type when a GET request carries
Content-Type: application/json, breaking OAuth metadata discovery.
Move Content-Type assignment inside the custom fetch wrapper so it is
only applied when the request carries a body (i.e. POST), leaving GET
requests header-clean.
Fixes #11431 parent 7c8b031 commit ee5e3d2
1 file changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
582 | 582 | | |
583 | 583 | | |
584 | 584 | | |
585 | | - | |
586 | 585 | | |
587 | 586 | | |
588 | 587 | | |
589 | 588 | | |
590 | 589 | | |
591 | 590 | | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
592 | 598 | | |
593 | 599 | | |
594 | | - | |
| 600 | + | |
595 | 601 | | |
596 | 602 | | |
597 | 603 | | |
| |||
611 | 617 | | |
612 | 618 | | |
613 | 619 | | |
614 | | - | |
615 | | - | |
616 | | - | |
| 620 | + | |
| 621 | + | |
| 622 | + | |
| 623 | + | |
| 624 | + | |
| 625 | + | |
| 626 | + | |
| 627 | + | |
617 | 628 | | |
618 | | - | |
| 629 | + | |
619 | 630 | | |
620 | 631 | | |
621 | 632 | | |
| |||
0 commit comments