Comments (10)
Or even get the koa-cors
maintainer to give up the name ideally.
But yeah, +1 because it's hard to remember what kcors
is when looking through dependencies...
from cors.
I'm not sure that @koa/cors
is the best name for this package as it's not consistent with the other core koa
packages. Ideally you could get the koa-cors
package name, otherwise maybe something more like koa-cors-official
.
from cors.
@jonathanong - If this is the policy for all koa packages then it makes sense, however you might want to notify the relevant TypeScript definition authors that the package has moved as @koa/cors
doesn't have any definitions but kcors
does.
from cors.
currently I copy declare code from @types/koa2-cors
to my index.d.ts
declare module "@koa/cors" {
import * as Koa from 'koa';
namespace cors {
interface Options {
origin?: string | ((ctx: Koa.Context) => boolean | string);
exposeHeaders?: string[];
maxAge?: number;
credentials?: boolean;
allowMethods?: string[];
allowHeaders?: string[];
}
}
function cors(options?: cors.Options): Koa.Middleware;
export = cors;
}
from cors.
I'm ok for this. @jonathanong just do it and add a deprecated message on the kcors
package.
from cors.
done
from cors.
i do not have access to kcors
from cors.
@stevehipwell we can slowly move koa packages to @koa/*
, which would be somewhat ideal Imo
from cors.
The name without @
is better because now it differs from the rest of koa
family and is the first one in dependency list, even above packages that start with a
letter.
Will stick with kcors
for now.
from cors.
done https://www.npmjs.com/package/@koa/cors
from cors.
Related Issues (20)
- Bump npm latest version to 2
- npm audit reveals security vulnerabilities
- GMT koa deprecated Support for generators will be removed in v3. See the documentation for examples of how to convert old middleware https://github.com/koajs/koa/blob/master/docs/migration.md at server\index.js:6:5 HOT 3
- Docs: Installation modify HOT 1
- Header not set on error response HOT 2
- How to set CORS of static resources HOT 2
- should preflight request return 204 instead of 404 when origin not match?
- documentation missing: needs to be used before router HOT 1
- allowHeaders doesn't support functions? HOT 2
- Does this still maintains ?
- Integrate with @types/koa__cors
- How to set multiple domains ? HOT 2
- How to resolve socket cors HOT 1
- https://github.com/koajs/cors/blob/master/index.js#L138
- Access-Control-Request-Private-Network HOT 2
- Should default options allow null origin?
- Allow not returning any access control headers if the Origin is not allowed to access the resource HOT 1
- Overly permissive origin policy HOT 2
- The default CORS configuration poses a security risk. HOT 3
- Access-Control-Allow-Origin set to '*' even when 'Origin' is supplied 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.