summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/index.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/index.js b/src/index.js
index 69041f0..8aa0863 100644
--- a/src/index.js
+++ b/src/index.js
@@ -14,7 +14,6 @@ async function handleRequest(request) {
// Initialize url and query
const url = new URL(request.url);
const query = url.search.split('?q=')[1];
- const origin = request.headers.get('Origin');
/*
* Rewrite request to point to API url. This also makes the request mutable
@@ -38,7 +37,7 @@ async function handleRequest(request) {
response = new Response(response.body, response);
// Set CORS headers
- response.headers.set('Access-Control-Allow-Origin', origin.includes('localhost') ? '*' : 'https://due.moe');
+ response.headers.set('Access-Control-Allow-Origin', 'https://due.moe');
// Append to/Add Vary header so browser will cache response correctly
response.headers.append('Vary', 'Origin');