if set "enableCookies: true" in swagger-ui 2.x, it will send cookies in request.
But it don't work in 3.x.
What should I do?
At the moment, that configuration is not yet available in 3.x. If you require it, either use 2.x or consider submitting a PR to 3.x to add support for it.
Just fired it up and having the same problem. But there is an option in the authorize modal to put in a cookie. Am I correct in assuming @HunDunDM had that option too, and it did not work?
Or was that input field in the modal added since then, and it's supposed to work now? Confused.
still not work now. I am waiting for this PR
__Not a robust solution__
currently the latest version(3.9.3)
edit dist/index.html
layout: "StandaloneLayout"
})
+ ui.fn.fetch.withCredentials = true
window.ui = ui
then work fine.
+1 to add cookie management in Swagger 3... natively
Crazy to have a spec, without proper implementation of it. Without any warning
We choose Swagger to this spec, so maybe it may be useful to change of tool
ui.fn.fetch.withCredentials = true
This worked for me. Using Firefox 59.0.2 the CORS Everywhere extension
I am slightly confused regarding what this is supposed to do?
I am looking for a way for Swagger UI to load the Swagger JSON from a CORS location (the thing which is specified via ?url=...), passing the Cookie information when doing that. Is this what it's supposed to do?
If so, it doesn't work in neither Safari nor Chrome (on macOS).
Most helpful comment
__Not a robust solution__
currently the latest version(3.9.3)
edit
dist/index.htmlthen work fine.