mirror of
https://github.com/go-shiori/shiori.git
synced 2026-04-25 06:25:54 +03:00
[GH-ISSUE #1109] --webroot flag not working with v1.7.4 #461
Labels
No labels
component:backend
component:builds
component:builds
component:extension
component:frontend
component:readability
database
database:mysql
database:postgres
database:sqlite
feature:ebooks
github_actions
good first issue
hacktoberfest
note:duplicate?
note:fixed?
note:out-of-scope?
os:windows
priority:high
priority:low
pull-request
resolution:as-intended
resolution:cant-reproduce
resolution:duplicate
resolution:fixed
resolution:wontfix
tag:TBD
tag:big-task
tag:help-wanted
tag:huge-data
tag:meta
tag:more-info
tag:next
tag:no-stale
tag:requires-migrations
tag:research
tag:security 🛡️
tag:stale
tag:waiting-for-assignee
type:bug
type:documentation
type:enhancement
type:meta
type:ux
user:cli
user:web
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/shiori#461
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @LordEidi on GitHub (May 30, 2025).
Original GitHub issue: https://github.com/go-shiori/shiori/issues/1109
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/@lawrencecandilas commented on GitHub (Jun 20, 2025):
I had this issue, but eventually got it working. I use nginx as a reverse proxy.
Command line I'm using to launch shiori
/opt/shiori/shiori server --address "[fc00::XXX:X]" --port XXXXX --webroot /dir/dir2/dir3/Working Nginx config:
I upgraded from 1.5.X and I had to alter the nginx config, but it is working with the above.
My older config that worked on 1.5.X but stopped working looked like this:
@Australis86 commented on GitHub (Jun 27, 2025):
@LordEidi - I think #1121 should address this. In my usage case the --webroot option does appear to be respected, but I had to add the trailing / to get it to work, e.g.
./shiori server --webroot /shiori/