Can the first head request sent by the axios cross-domain request be removed?

problem description

I found that axios sends an option request before each request, verifying methods that can be cross-domain. This implementation may be more standard, but there is no such additional request when using jquery before.

when I think both the front and back ends are on my own, can this mechanism be relaxed a little bit, instead of sending additional option requests? does axios have this configuration item?

Apr.13,2022

just go to the custom header


here are two articles for your reference
https://codeshelper.com/a/11...
https://codeshelper.com/q/10...


https://stackoverflow.com/que...

Menu