Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how remove options before post? #888

Closed
excxapp opened this issue May 5, 2017 · 9 comments
Closed

how remove options before post? #888

excxapp opened this issue May 5, 2017 · 9 comments

Comments

@excxapp
Copy link

excxapp commented May 5, 2017

when post ,always send options first , can turn off this?

@443866786
Copy link

i'm suffering this too

@larvanitis
Copy link

It sounds like you are making a CORS request. In that case you should read this http://stackoverflow.com/questions/29954037/how-to-disable-options-request.

@ZevenFang
Copy link

Look at this
https://github.com/mzabriskie/axios#using-applicationx-www-form-urlencoded-format

@fairyly
Copy link

fairyly commented Sep 8, 2017

@rubennorte I don't understand , how to disable the option before get/post??

@aztrock
Copy link

aztrock commented Jul 11, 2018

same question that @fairyly

@arivera12
Copy link

arivera12 commented Sep 15, 2018

The solution to prevent preflight request is to set the header Access-Control-Max-Age.

The Access-Control-Max-Age response header indicates how long the results of a preflight request (that is the information contained in the Access-Control-Allow-Methods and Access-Control-Allow-Headers headers) can be cached.

For more information look this link.

@bruno-rodrigues
Copy link

Please be aware that the maximum caching time to Access-Control-Max-Age for Chromium is 10 minutes. Not very helpful to my current specific case :P

https://cs.chromium.org/chromium/src/services/network/public/cpp/cors/preflight_result.cc?l=36&rcl=52002151773d8cd9ffc5f557cd7cc880fddcae3e

@illmoded
Copy link

@larvanitis
Copy link

@bruno-rodrigues Chromium's max cache time has ben increased to 2 hours.

See:

@axios axios locked and limited conversation to collaborators May 22, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants