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

[Feature Request] host on sub page #174

Open
binyaminyblatt opened this issue May 15, 2022 · 1 comment
Open

[Feature Request] host on sub page #174

binyaminyblatt opened this issue May 15, 2022 · 1 comment
Labels
enhancement New feature or request

Comments

@binyaminyblatt
Copy link

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

@binyaminyblatt binyaminyblatt added the enhancement New feature or request label May 15, 2022
@renjfk
Copy link

renjfk commented Aug 25, 2024

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/"
  }
}

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

No branches or pull requests

2 participants