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.
At
wt-tracker/lib/run-uws-tracker.ts
Lines 238 to 246 in 400a436
index.htmlfile. In the same way that serving theindex.htmlfile is an opt-in, it would be useful to allow to check and serve apublicfolder before give up and return a 404, maybe being theindex.htmlfile inside it. That would allow to serve not only some Javascript and CSS files associated with theindex.htmlfile, but more important, it would allow to serve the actual HLS fragments directly from the same server, without needing to spin-up other processes.