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

Update webui.py #2127

Merged
merged 4 commits into from
Feb 10, 2024
Merged

Update webui.py #2127

merged 4 commits into from
Feb 10, 2024

Conversation

Schm1tz1
Copy link
Contributor

@Schm1tz1 Schm1tz1 commented Feb 1, 2024

Enabling authentication for local and shared UI (--listen and --share), see #2126

@mashb1t mashb1t linked an issue Feb 1, 2024 that may be closed by this pull request
@mashb1t
Copy link
Collaborator

mashb1t commented Feb 1, 2024

Some other users and me have only recently chatted about this exact feature somewhere in the discussions 👍

@Schm1tz1
Copy link
Contributor Author

Schm1tz1 commented Feb 1, 2024

Nice! I am using a reverse proxy to access Fooocus from the outside and are testing with Cloudflare Tunnels and I didn't want unauthenticated access so I tried this modification. Seems to be backwards-compatible, non-breaking.

webui.py Outdated Show resolved Hide resolved
@mashb1t
Copy link
Collaborator

mashb1t commented Feb 1, 2024

NIce! I am using a reverse proxy to access Fooocus from the outside and are testing with Cloudflare Tunnels and I didn't want unauthenticated access so I tried this modification. Seems to be backwards-compatible, non-breaking.

IMHO the best case scenario in this case would be to not even route unauthenticated traffic to Fooocus at all but filter it in the reverse proxy.

@Schm1tz1
Copy link
Contributor Author

Schm1tz1 commented Feb 1, 2024

NIce! I am using a reverse proxy to access Fooocus from the outside and are testing with Cloudflare Tunnels and I didn't want unauthenticated access so I tried this modification. Seems to be backwards-compatible, non-breaking.

IMHO the best case scenario in this case would be to not even route unauthenticated traffic to Fooocus at all but filter it in the reverse proxy.

For that case it makes senes but let's not discuss that here - it depends a lot on the whole networking setup and how your Ingress / Proxy / NAT setup looks like. The PR is just about allowing basic authentication on Fooocus - one can still decide to move it to the ingress part or not.

Only enable AuthN for --listen and --share

Co-authored-by: Manuel Schmid <[email protected]>
@mashb1t mashb1t mentioned this pull request Feb 3, 2024
@mashb1t mashb1t added the Size S small change, basically no testing needed label Feb 8, 2024
@mashb1t mashb1t changed the base branch from main to develop February 10, 2024 17:10
@mashb1t mashb1t merged commit 1181d48 into lllyasviel:develop Feb 10, 2024
mashb1t added a commit that referenced this pull request Feb 10, 2024
* Update webui.py

* Update readme.md

* Update webui.py

Only enable AuthN for --listen and --share

Co-authored-by: Manuel Schmid <[email protected]>

* docs: rephrase documentation changes for auth

---------

Co-authored-by: Manuel Schmid <[email protected]>
Co-authored-by: Manuel Schmid <[email protected]>
@Schm1tz1 Schm1tz1 deleted the Issue-2126 branch February 16, 2024 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Size S small change, basically no testing needed
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add Authentication also for --listen API and add documentation
2 participants