Reputation: 193
The sails.js(SailsJs CORS) website says that the Sails CORS hook is disabled by default, but I am currently working with a code base, where it seems to be enabled. I want to disable the same but I cannot find an answer on Stack Overflow, as well as on other sites to this. I also researched the Sails page to begin with, but with no luck.
Upvotes: 1
Views: 108
Reputation: 193
The solution to this is as follows:
app_home_dir/.sailssrc
You will find this JSON
object there there:
{
"generators": {
"modules": {}
},
"hooks": {
"blueprints": false,
"views": false,
"sockets": false,
"pubsub": false,
"i18n": false,
"cors": true
}
}
cors
property and set it to false
.This will disable the default Sails CORS hook.
Upvotes: 1