Skip to content

Commit 1bd256a

Browse files
committed
chore: add headers to response
1 parent 416baa8 commit 1bd256a

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/index.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,14 @@ async function handleRequest(req, env, ctx) {
289289

290290
let res = new Response(JSON.stringify({ Status, Comment }), {
291291
headers: {
292-
"Content-Type": "application/json"
292+
'content-type': types.json,
293+
'Access-Control-Allow-Methods': 'GET, HEAD, OPTIONS, POST',
294+
'Access-Control-Allow-Headers': 'Content-Type',
295+
'Access-Control-Allow-Origin': '*',
296+
'Access-Control-Max-Age': '3600',
297+
'server': 'DNS-over-HTTPS/2.3.7 (+https://github.com/aetherinox/dns-over-https-worker)',
298+
'x-powered-by': 'DNS-over-HTTPS/2.3.7 (+https://github.com/aetherinox/dns-over-https-worker)',
299+
'Vary': 'Accept',
293300
},
294301
});
295302

0 commit comments

Comments
 (0)