Skip to content

Commit

Permalink
Refactor response object in _worker.js
Browse files Browse the repository at this point in the history
  • Loading branch information
3Kmfi6HP committed Mar 23, 2024
1 parent 344d13a commit 65cf322
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,12 +73,7 @@ export default {
case `/bestip/${userID_Path}`: {
const bestSubConfig = await fetch(`https://sub.xf.free.hr/auto?host=${request.headers.get('Host')}&uuid=${userID}`);
// Construct and return response object
return new Response(bestSubConfig, {
status: 200,
headers: {
"Content-Type": "text/plain;charset=utf-8",
}
});
return bestSubConfig;
};
default:
// return new Response('Not found', { status: 404 });
Expand Down

0 comments on commit 65cf322

Please sign in to comment.