Data
- Shiori version: 1.7.4
- Database Engine: SQLite
- Operating system: Debian stable
- CLI/Web interface/Web Extension: Web Interface
Describe the bug / actual behavior
Today, I tried to update my instance of shiori. My instance used to run behind an instance of nginx and finely served pages as expected.
During the update process, I changed my flags from
./shiori serve --webroot /shiori --portable
to
./shiori server --webroot /shiori --portable
as mentioned in the logs.
After updating the binary to v1.7.4, the reverse proxy setup does not work anymore. I get 404 errors in the log like this:
method=GET path=/shiori/login/ referer= statusCode=404
I then exposed the webserver with the flag --address 0.0.0.0 and tried to use curl and to access the shiori instance from a different machine directly (without going through the reverse proxy).
This works (login page is served):
curl http://mysite:8080/
This does not (404):
curl http://mysite:8080/shiori/
So it seems, that Shiori does not respect / use the --webroot flag on the latest version.
Expected behavior
I expect Shiori to serve pages under the --webroot flag, namely (in my example) under:
curl http://mysite:8080/shiori/
I would also expect the served login page to rewrite the API URL respecting the --webroot flag. But I find this line in the served login content:
const response = await fetch(new URL("api/v1/auth/me", document.baseURI), {
Which IMHO is wrong as well, it should have the --webroot flag in front of the URL.
To Reproduce
./shiori server --webroot /shiori --portable
- and try to access it with
curl http://127.0.0.1:8080/shiori/
Data
Describe the bug / actual behavior
Today, I tried to update my instance of shiori. My instance used to run behind an instance of nginx and finely served pages as expected.
During the update process, I changed my flags from
./shiori serve --webroot /shiori --portableto
./shiori server --webroot /shiori --portableas mentioned in the logs.
After updating the binary to v1.7.4, the reverse proxy setup does not work anymore. I get 404 errors in the log like this:
method=GET path=/shiori/login/ referer= statusCode=404I then exposed the webserver with the flag --address 0.0.0.0 and tried to use curl and to access the shiori instance from a different machine directly (without going through the reverse proxy).
This works (login page is served):
curl http://mysite:8080/This does not (404):
curl http://mysite:8080/shiori/So it seems, that Shiori does not respect / use the --webroot flag on the latest version.
Expected behavior
I expect Shiori to serve pages under the --webroot flag, namely (in my example) under:
curl http://mysite:8080/shiori/I would also expect the served login page to rewrite the API URL respecting the --webroot flag. But I find this line in the served login content:
const response = await fetch(new URL("api/v1/auth/me", document.baseURI), {Which IMHO is wrong as well, it should have the --webroot flag in front of the URL.
To Reproduce
./shiori server --webroot /shiori --portablecurl http://127.0.0.1:8080/shiori/