Skip to content

Commit

Permalink
add cf proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
zizifn committed May 19, 2023
1 parent 67a2e0c commit 4ce656a
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions client-config/cf-proxy.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
export default {
async fetch(request, env) {
let url = new URL(request.url);
url.hostname = ''
let new_request = new Request(url, request);
console.log('-----', new_request.url)
return fetch(new_request);
},
};

0 comments on commit 4ce656a

Please sign in to comment.