Skip to content

determine default base path using window.location#2

Open
cphlipot wants to merge 1 commit into
leejet:masterfrom
cphlipot:default_relative_base_path
Open

determine default base path using window.location#2
cphlipot wants to merge 1 commit into
leejet:masterfrom
cphlipot:default_relative_base_path

Conversation

@cphlipot
Copy link
Copy Markdown

@cphlipot cphlipot commented May 6, 2026

Instead of assuming all the sdcpp APIs are located relative to the
origin, instead assume these endpoints are relative to the current
location of the loaded UI.

This enables use cases like running sd-server and serving it via
a reverse proxy (eg. using the separate llama-swap project) and
still maintaining functionality of the front end both in the reverse
proxy situation as well as just directly running sd-server on localhost.

Testing:

Instead of assuming all the sdcpp APIs are located relative to the
origin, instead assume these endpoints are relative to the current
location of the loaded UI.

This enables use casles like running sd-server and serving it via
a reverse proxy (eg. using the separate llama-swap project) and
still maintaining functionality of the front end both in the reverse
proxy situation as well as just directly running sd-server on localhost.

Testing:
- run sd-server directly and verify we can still generate an image
- run sd-server via llama-swap and verify we can generate an image
 via the http://localhost:8080/upstream/:model_name url (previously failed)
@cphlipot cphlipot marked this pull request as ready for review May 6, 2026 22:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant