Comments (1)
I might be mistaken, but from what I gathered from the spec is that multiple domains are not supported ( https://www.w3.org/TR/cors/#access-control-allow-credentials-response-header ).
To use multiple origins with this middleware, use the feature to pass a function in options.origin
that compares the origin of the request (this.get('origin')
in Koa 1) with your array and echos back the request origin if it is on your list.
from koa-cors.
Related Issues (20)
- errors when passing origin as option HOT 1
- Chrome content-type on POST HOT 5
- Cors headers on non OPTIONS HOT 2
- handling errors HOT 4
- 'settings' should be immutable HOT 1
- Add "Vary: Origin" to response when the server specifies an origin host rather than "*" HOT 2
- Accept a whitelist of origins? HOT 3
- expose PATCH by default HOT 7
- Add setting to yield next on OPTION request HOT 4
- Canβt get CORS working with KOA
- Getting request origin within the origin function HOT 1
- overrides Access-Control-Allow-Methods
- with koa static page serving HOT 2
- Support koa@2 HOT 21
- methods option doesn't work in v2? HOT 1
- Support Typescript @types HOT 6
- Headers not sent on throw HOT 1
- Hi, Does this project is still maintained? HOT 2
- Should CORS be abandoned?
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 koa-cors.