Comments (6)
from falcon-cors.
Thanks @lwcolton , I've recreated the issue with other services as well.
from falcon-cors.
from falcon-cors.
Sorry for the delay, with CORS enabled, everything works for Postman, but fails from cURL and my ReactJS application. With Falcon_cors implemented, the same thing occurs. The failure is "Request header field Content-Type is not allowed by Access-Control-Allow-Headers in preflight response."
The other one is the typical CORS one, URL not allowed due to origin.
Another team member ran their changes through our full CI/CD suite so I'm reverting some stuff in a test environment. It's always working from Postman and a web browser though.
Edit: It is working fine through cURL and Postman now that everything is back to how it was with falcon_cors setup. Still getting Content Type issue and origin errors from ReactJs App.
from falcon-cors.
Ok I have to apologize, I think I misread your readthedocs page...
I've gotten it working, and I had to include the single whitelisted URL.
This is the winning configuration:
cors = CORS(allow_origins_list=['http://localhost:3000'])
api = falcon.API(middleware=[cors.middleware])
public_cors = CORS(allow_all_origins=True, allow_all_methods=True, allow_all_headers=True)
When I remove localhost:3000 (which isn't where I'm hitting it from), then Content-Type issue appears and if I try to specify any specific headers, methods, or origins I seem to run into problems.
I even tried copying the request methods and headers into the response.
Thank you for building this library, sorry to waste some time!!
from falcon-cors.
from falcon-cors.
Related Issues (13)
- Request header not allowed HOT 3
- Origin not allowed, request processed HOT 1
- CRA + Falcon CORS: Request header field content-type is not allowed by Access-Control-Allow-Headers in preflight response
- Error 503 while trying to access to an endpoint with a public cors HOT 1
- Python 3? HOT 3
- Spelling issue in log.py HOT 2
- Logging support is needed
- Requests blocked with 'unallowed method' when route has suffix HOT 2
- Deprecation warning due to invalid escape sequences
- django rest api usage and CORS problem HOT 1
- Code Coverage?
- Not getting Access-Control-Allow-Headers header in response to OPTIONS request HOT 2
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 falcon-cors.