Skip to content

Commit

Permalink
Update index.js
Browse files Browse the repository at this point in the history
  • Loading branch information
willswire authored Feb 2, 2022
1 parent dc3b584 commit 04a3019
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,13 @@ async function handleRequest(request) {

switch (pathname) {
case "/":
return Response.redirect("https://unificloudflareddns.com/", 301)
return new Response("Hello World!", {
status: 200,
headers: {
"Content-Type": "text/plain;charset=UTF-8",
"Cache-Control": "no-store"
},
});

case "/update": {
if (request.headers.has("Authorization")) {
Expand Down Expand Up @@ -67,7 +73,8 @@ async function informAPI(url, name, token) {
return new Response("DNS Record Update Successful!", {
status: 200,
headers: {
"Cache-Control": "no-store",
"Content-Type": "text/plain;charset=UTF-8",
"Cache-Control": "no-store"
},
});
}
Expand Down

0 comments on commit 04a3019

Please sign in to comment.