File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -924,6 +924,32 @@ return [
924924> **must** be set according to the
925925> [OpenID Connect specification](https://openid.net/specs/openid-connect-core-1_0.html).
926926
927+ # # Sending Credentials with Swagger UI Requests
928+
929+ When your API is deployed behind a proxy that uses cookie-based authentication (e.g. Cloudflare
930+ Access), Swagger UI's requests may be rejected because the authentication cookie is not forwarded by
931+ default. Enabling `withCredentials` adds a `requestInterceptor` to SwaggerUIBundle that sets
932+ `credentials : ' include' ` on every outgoing request, ensuring cookies are sent alongside token and
933+ CORS requests.
934+
935+ ### Sending Credentials with Swagger UI Requests using Symfony
936+
937+ > [!NOTE] This feature is only available with Laravel. You're welcome to contribute the Symfony
938+ > implementation [on GitHub](https://github.com/api-platform/core).
939+
940+ ### Sending Credentials with Swagger UI Requests using Laravel
941+
942+ ` ` ` php
943+ <?php
944+ // config/api-platform.php
945+ return [
946+ // ...
947+ ' swagger_ui' => [
948+ ' with_credentials' => true,
949+ ],
950+ ];
951+ ```
952+
927953## Info Object
928954
929955The [ info object] ( https://swagger.io/specification/#info-object ) provides metadata about the API
You can’t perform that action at this time.
0 commit comments