Skip to content
This repository has been archived by the owner on May 17, 2024. It is now read-only.

Update http-server-files.ts - Only read from static/ directory #126

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion data/http-server-files.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
* @title HTTP Server: Serving Files
* @difficulty intermediate
* @tags cli, deploy
* @run --allow-net --allow-read <url>
* @run --allow-net --allow-read=static/ <url>
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
* @run --allow-net --allow-read=static/ <url>
* @run --allow-net --allow-read=static/,path/to/file.txt <url>

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@hashrock Like this maybe?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, and static/ -> public/ because of fsRoot option

* @resource {https://deno.land/api?s=Deno.serve} Doc: Deno.serve
* @resource {$std/http/file_server.ts} Doc: std/http/file_server
* @resource {/http-server} Example: HTTP Server: Hello World
Expand Down
Loading