Skip to content

Commit

Permalink
apn
Browse files Browse the repository at this point in the history
  • Loading branch information
nb557 committed Aug 28, 2024
1 parent 0b96847 commit 6ba89c4
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions cloudflare_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default {
let body = "";
request.headers.forEach((value, key) => body += key + " = " + value + "\n");
body += "request_url" + " = " + request.url + "\n";
body += "worker_version = 1.04\n";
body += "worker_version = 1.05\n";
return new Response(body, corsHeaders);
}

Expand Down Expand Up @@ -144,7 +144,7 @@ export default {
request.headers.delete("cf-ray");
request.headers.delete("cf-visitor");
}
if (ip) {
if (ip && ip !== "no") {
//request.headers.set("X-Forwarded-For", ip);
//request.headers.set("X-Forwarded-Proto", "https");
request.headers.set("X-Real-IP", ip);
Expand Down
4 changes: 2 additions & 2 deletions deno_apn.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function handle(request, connInfo) {
body += "connInfo" + " = " + JSON.stringify(connInfo.remoteAddr) + "\n";
}
body += "request_url" + " = " + request.url + "\n";
body += "apn_version = 1.04\n";
body += "apn_version = 1.05\n";
return new Response(body, corsHeaders);
}

Expand Down Expand Up @@ -147,7 +147,7 @@ async function handle(request, connInfo) {
request.headers.delete("cf-ray");
request.headers.delete("cf-visitor");
}
if (ip) {
if (ip && ip !== "no") {
request.headers.set("X-Forwarded-For", ip);
request.headers.set("X-Forwarded-Proto", "https");
request.headers.set("X-Real-IP", ip);
Expand Down
4 changes: 2 additions & 2 deletions deno_worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ async function handle(request, connInfo) {
body += "connInfo" + " = " + JSON.stringify(connInfo.remoteAddr) + "\n";
}
body += "request_url" + " = " + request.url + "\n";
body += "worker_version = 1.04\n";
body += "worker_version = 1.05\n";
return new Response(body, corsHeaders);
}

Expand Down Expand Up @@ -147,7 +147,7 @@ async function handle(request, connInfo) {
request.headers.delete("cf-ray");
request.headers.delete("cf-visitor");
}
if (ip) {
if (ip && ip !== "no") {
request.headers.set("X-Forwarded-For", ip);
request.headers.set("X-Forwarded-Proto", "https");
request.headers.set("X-Real-IP", ip);
Expand Down

0 comments on commit 6ba89c4

Please sign in to comment.