We now enforce javasctipt's strict mode
(via 'use strict';
) at the top of most Actionhero files. This enables easier opt-in to new ES6 features, and will help catch errors which might sneak by otherwise. You should notice no change in Actionhero's behavior. Newly generated files (Actions, Tasks, etc) will also contain the line 'use strict';
at the top of each file, but you can remove it if you don't want strict mode for some reason.
You can learn more about strict mode here: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode
null
HTTP HeadersYou can now set some of the default HTTP headers to null
if you don't want them returned to the client. For example, if you no longer want to send Access-Control-Allow-Origin
, you can do the following in config/servers/web.js
:
exports.production = { servers: { web: function(api){ return { httpHeaders : { 'Access-Control-Allow-Origin' : null, }, } } } }