]> git.r.bdr.sh - rbdr/generador-de-insultos/commitdiff
Add CORS to raw endpoint
authorBen Beltran <redacted>
Fri, 26 Jul 2019 14:47:22 +0000 (16:47 +0200)
committerBen Beltran <redacted>
Fri, 26 Jul 2019 14:47:22 +0000 (16:47 +0200)
bin/server.js

index 2dbcc1d1d4ae9c16165613cbb584f602fc4432fa..00c23bbb8dc9325df89fdfd3c601bc9e2cd54257 100755 (executable)
@@ -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) {