From: Ben Beltran Date: Fri, 26 Jul 2019 14:47:22 +0000 (+0200) Subject: Add CORS to raw endpoint X-Git-Url: https://git.r.bdr.sh/rbdr/generador-de-insultos/commitdiff_plain/9002702b5b325ec290cc5b6ee51f7fa80e8bad74?ds=inline;hp=-c Add CORS to raw endpoint --- 9002702b5b325ec290cc5b6ee51f7fa80e8bad74 diff --git a/bin/server.js b/bin/server.js index 2dbcc1d..00c23bb 100755 --- a/bin/server.js +++ b/bin/server.js @@ -33,6 +33,12 @@ server.route({ }); server.route({ + config: { + cors: { + origin: ['*'], + additionalHeaders: ['cache-control', 'x-requested-with'] + } + }, method: 'GET', path:'/raw', handler: function (request, reply) {