diff --git a/lib/hooks/cors/README.md b/lib/hooks/cors/README.md index 640fa7ea5d..041f377062 100644 --- a/lib/hooks/cors/README.md +++ b/lib/hooks/cors/README.md @@ -41,6 +41,7 @@ This hook sets the following implicit default configuration on `sails.config`: | Property | Type | Default | |-----------------------------------------------|:-------------:|-----------------| | `sails.config.cors.origin` | ((string)) | `'*'` +| `sails.config.cors.allRoutes` | ((boolean)) | `false` | `sails.config.cors.credentials` | ((boolean)) | `true` | `sails.config.cors.methods` | ((string)) | `'GET, POST, PUT, DELETE, OPTIONS, HEAD'` | `sails.config.cors.headers` | ((string)) | `'content-type'` diff --git a/lib/hooks/cors/index.js b/lib/hooks/cors/index.js index dac814a557..391ee400c1 100644 --- a/lib/hooks/cors/index.js +++ b/lib/hooks/cors/index.js @@ -28,6 +28,7 @@ module.exports = function(sails) { defaults: { cors: { origin: '*', + allRoutes: false, credentials: true, methods: 'GET, POST, PUT, DELETE, OPTIONS, HEAD', headers: 'content-type',