Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to serve public folder #38

Open
piranna opened this issue Mar 17, 2021 · 0 comments
Open

Add option to serve public folder #38

piranna opened this issue Mar 17, 2021 · 0 comments
Labels
enhancement New feature or request

Comments

@piranna
Copy link

piranna commented Mar 17, 2021

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants