Suwayomi-WebUI
Suwayomi-WebUI copied to clipboard
[Feature Request] host on sub page
It would make it much easier to host behind a reverse proxy that is not its own URL I'm sorry I don't know electron so I can't tell you what it would take to adjust to allow for this
Just so you know, you can already do this without modifying anything on Suwayomi-WebUI with caddy (replace-response module enabled) using the following config:
handle_path /suwayomi/* {
reverse_proxy {REAL_SUWAYOMI_ADDRESS}:4567 {
header_up Accept-Encoding identity
header_up Host {host}
}
replace {
match {
header Content-Type text/html*
header Content-Type text/css*
header Content-Type application/javascript*
header Content-Type application/json*
}
# Replace the ones in HTML and CSS
"href=\"/" "href=\"/suwayomi/"
"src=\"/" "src=\"/suwayomi/"
"url(/" "url(/suwayomi/"
# react-router <BrowserRouter> basename hack
re "basename:([^=]+)=\"/\"" "basename:$1=\"/suwayomi/\""
# Replace the rest loaded dynamically in JS
"/locales" "/suwayomi/locales"
"/api/" "/suwayomi/api/"
"\"assets/" "\"suwayomi/assets/"
}
}