Skip to content

Commit

Permalink
format root dir json data
Browse files Browse the repository at this point in the history
  • Loading branch information
3Kmfi6HP committed Jul 15, 2023
1 parent 743234c commit c826d66
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 6 deletions.
7 changes: 6 additions & 1 deletion _worker.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,12 @@ export default {
const url = new URL(request.url);
switch (url.pathname) {
case '/':
return new Response(JSON.stringify(request.cf), { status: 200 });
return new Response(JSON.stringify(request.cf, null, 4), {
status: 200,
headers: {
"Content-Type": "application/json;charset=utf-8",
},
});
case '/connect': // for test connect to cf socket
const [hostname, port] = ['cloudflare.com', '80'];
console.log(`Connecting to ${hostname}:${port}...`);
Expand Down
2 changes: 1 addition & 1 deletion minify/README.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
This folder contains the built output assets for the worker "cf-worker-ws-dev" generated at 2023-07-15T21:49:34.430Z.
This folder contains the built output assets for the worker "cf-worker-ws-dev" generated at 2023-07-15T22:12:41.508Z.
4 changes: 2 additions & 2 deletions minify/_worker.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c826d66

Please sign in to comment.