sails-hook-livemode
v0.0.1
Published
Sails hook to parse livemode in request header
Downloads
13
Readme
About
A sails hook to detect livemode of request by detect key in request header.
Configurations
config key: livemode
module.exports.livemode = {
default: 1 // default value : true, (boolean or number [0,1] can be use)
header: 'custom-header-key' // default value : livemode,
}
header key will be added in config.security.cors.allowRequestHeaders to pass cors preflight check
Use it
console.log(req.livemode);