1.0.3 • Published 8 years ago

bap-node-microframework-cors v1.0.3

Weekly downloads
-
License
ISC
Repository
-
Last release
8 years ago

node-microframework-cors

Plugin to activate cors support

Installing

To install and add the dependency to the package.json, run the following command:

npm install bap-node-microframework-cors --save

Configuration

To activate cors support with the default options (enable All CORS Requests), write the following code in app/app.ts:

// app/app.ts
...

import { CorsPlugin } from 'bap-node-microframework-cors';

...

import { Kernel } from "./kernel";
var kernel = new Kernel();
var App = new Application(<ApplicationOptions>{
    ...
}, <KernelInterface>kernel);

...

App.registerPlugin(CorsPlugin, {});

...

App.start();

...

You can read the full list of configuration options (here)https://github.com/expressjs/cors#configuration-options (at the moment, only origin and credentials are supported).

1.0.3

8 years ago

1.0.2

8 years ago

1.0.1

8 years ago

1.0.0

8 years ago