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

feat(web,server): external domain setting #6146

Merged
merged 3 commits into from
Jan 4, 2024
Merged

Conversation

jrasm91
Copy link
Contributor

@jrasm91 jrasm91 commented Jan 3, 2024

Closes #6147.

Add the option to set the instance's "external domain", which currently is used as an override for window.origin when constructing the shared link url to copy to the clipboard.

Admin Settings

image

Shared Links

image

Copy link

cloudflare-pages bot commented Jan 3, 2024

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 0c59513
Status: ✅  Deploy successful!
Preview URL: https://07547a62.immich.pages.dev
Branch Preview URL: https://feat-external-domain-setting.immich.pages.dev

View logs

Copy link
Member

@danieldietzler danieldietzler left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@jrasm91 jrasm91 requested a review from bo0tzz January 3, 2024 21:47
@jrasm91 jrasm91 merged commit 317adc5 into main Jan 4, 2024
21 checks passed
@jrasm91 jrasm91 deleted the feat/external-domain-setting branch January 4, 2024 02:54
@vcdwelt
Copy link

vcdwelt commented Jan 8, 2024

Maybe a small thing to add. The external URl must be entered without a / at the end, otherwise the links conatining a // an wont work.
Maybe something like:
"Domain for public shared links, including http(s):// and without / at the end."

Otherwise a really great addon! :-)

@danieldietzler
Copy link
Member

Maybe a small thing to add. The external URl must be entered without a / at the end, otherwise the links conatining a // an wont work. Maybe something like: "Domain for public shared links, including http(s):// and without / at the end."

Otherwise a really great addon! :-)

Thanks for pointing this out! Actually, we shouldn't restrict the input but instead better sanitize the link :)

martabal pushed a commit that referenced this pull request Jan 9, 2024
* feat: external domain setting

* chore: open api

* mobile: handle serverconfig-externalDomain

---------

Co-authored-by: shenlong-tanwen <139912620+shalong-tanwen@users.noreply.github.com>
@devtechk
Copy link

devtechk commented May 2, 2024

Hello Guys, I was tryng to expose externally only the "/share" links and not the entire immich service, just to share only photos. Someone can help me? Thank you!

@danieldietzler
Copy link
Member

danieldietzler commented May 2, 2024

@devtechk Please open a new discussion or ask this question in our Discord, not in an already merged PR. However, as a first hint; that's something your reverse proxy should take care of (accept requests to /share if coming from a subnet/port/whatever).

@devtechk
Copy link

devtechk commented May 2, 2024

Thank you @danieldietzler I've just managed it. I used Nginx Proxy Manager and duckdns so I've allowed the /share/* location and denied the others location "/".I think I will open a new discussion to tell how I've done. Where I can find discord about immich? thank you

@danieldietzler
Copy link
Member

The discord is linked right at the top of the readme. Glad to hear it works @devtechk :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature] Configurable Public URL for Share Links
6 participants