You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What specific section or headline is this issue about?
Suggestions for implementation
What information was incorrect, unhelpful, or incomplete?
As pre-flight requests are created 'automatically" it makes is perhaps hard on the developer to implement a correct response to exactly such a request. How should a pre-flight request be debugged?
What did you expect to see?
Some suggestions how to coerce a browser to start a pre-flight request. Or a more elaborate process flow of request, pre-flight-request. and the expected responses.
Do you have any supporting links, references, or citations?
@theking2 It has been a while but I don't think the request of this issue is clear. Are you asking for advice as the implementer of client code or server code? It seems you are implementing a server that responds to preflight requests, and you want to reliably trigger preflight requests in the browser so you can test your server's responses?
I believe most existing server solutions handle preflight requests automatically without explicitly handling OPTIONS requests. We already document what headers browsers expect from the preflight response.
How to use devtools to force a pre-flight request in order to test an api implementation? That is what I'm looking for. Pre-Flight request results are cached and not performed anymore for some time (?) or until the browser closes (?).
@theking2 Preflight requests are sent as options headers and as per the docs the server can set the cache time using Access-Control-Max-Age. Otherwise I would expect the default caching to be zero, but a quick internet search indicates it is 5 seconds on some browsers.
So the caching is up to the server you are talking to. If you don't have control over that server, then you can always select the "Disable Cache" checkbox in developer tools, which is usually in the Network tab.
I'm closing this as I consider the documentation sufficient.
MDN URL
https://developer.mozilla.org/en-US/docs/Glossary/Preflight_request
What specific section or headline is this issue about?
Suggestions for implementation
What information was incorrect, unhelpful, or incomplete?
As pre-flight requests are created 'automatically" it makes is perhaps hard on the developer to implement a correct response to exactly such a request. How should a pre-flight request be debugged?
What did you expect to see?
Some suggestions how to coerce a browser to start a pre-flight request. Or a more elaborate process flow of request, pre-flight-request. and the expected responses.
Do you have any supporting links, references, or citations?
https://reflectoring.io/complete-guide-to-cors/
Do you have anything more you want to share?
Apart from that: excellent source
MDN metadata
Page report details
en-us/glossary/preflight_request
The text was updated successfully, but these errors were encountered: