Skip to content

Add option to serve public folder #38

Description

@piranna

At

).any(
"/*",
(response: HttpResponse, request: HttpRequest) => {
debugRequest(server, request);
const status = "404 Not Found";
response.writeStatus(status).end(status);
},
);
is being explicitly forbidden to serve any content that are not the WebTorrent WebSocket connections, the JSON stats endpoint, or an index.html file. In the same way that serving the index.html file is an opt-in, it would be useful to allow to check and serve a public folder before give up and return a 404, maybe being the index.html file inside it. That would allow to serve not only some Javascript and CSS files associated with the index.html file, but more important, it would allow to serve the actual HLS fragments directly from the same server, without needing to spin-up other processes.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions