Comments (5)
@turtlemonvh is it okay if 200 is returned for "every" case?
from cors.
I'm not sure to fully understand what's going on by just reading your issue. I will try to find some time to study the behavior with Gin. I leave this issue open in the meantime.
from cors.
Have the same exact problem using Macaron - also using HandlerFunc
from cors.
I'm using this set-up...
c := cors.New(cors.Options{
AllowedOrigins: []string{"*"},
AllowCredentials: true,
OptionsPassthrough: true,
})
handler := c.Handler(api.router)
// Run
log.Fatal(http.ListenAndServe(port, handler))
With Gorilla mux router, getting 404 OPTIONS
from cors.
@shrinathaithal Sorry I didn't see this before. I think that returning a 200 is always ok for OPTIONS requests if OptionsPassthrough
is set to false
, since this sort of implies that this library is handling OPTIONS requests for you.
It looks like that was fixed per #26, which solves my short term problems, at least.
from cors.
Related Issues (20)
- Will support fasthttp router?
- security issue: should not allow rejected requests to go forward HOT 4
- Unexpected response when requesting with multiple comma separated origins and wildcard AllowedOrigins HOT 6
- gocover.io has shut down HOT 1
- gin wrapper default status HOT 1
- Listing Origin as an allowed request header is unnecessary HOT 4
- No way to disable caching of preflight responses HOT 1
- Access-Control-Expose-Headers should be sent in preflight response HOT 2
- AllowOriginRequestFunc considered harmful (may lead to Web cache poisoning) HOT 2
- Allowing methods that are not uppercase should be possible but isn't HOT 5
- Unexpected `Access-Control-Expose-Headers` header behavior HOT 2
- [Feature Request] AllowCredentialsFunc: boolean, HOT 2
- Middleware benchmarks are still skewed (follow-up to #156)
- AllowedOrigins doesn't block unlisted origins HOT 2
- .
- Some malicious/spoofed preflight requests cause prohibitive load HOT 3
- cors not adding multiple Access-Control-Allow-Origin entries HOT 2
- failing local test since v1.11.0 HOT 3
- Case-sensitive look up on allowed headers map HOT 4
- Arbitrary origin allowed in CORS header HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cors.