-
-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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(mobile): add additional request headers #10588
feat(mobile): add additional request headers #10588
Conversation
Thanks for your code! I have been tested this branch and it works! I also found some issues with this:
|
Hey, thanks for testing!. I'll check out the live photos/videos. I'm sure i'll figure out the state management, but would appreciate any pointers :). cheers |
Hi, I've tested videos, they seem to work for me. Perhaps your setup didn't work? Fixed the headers deleting, and figured out the state management finally. Let you know when it's ready for review.. thanks! |
Can you help resolve the conflict and provide the screenshot of the UI change? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@matejkramny I tested and refactored some stuff. Working well! Thanks for your contribution <3
@matejkramny Can you help with a separate PR for documentation? |
Heppy to help out. You guys are great |
This is amazing work!! This is exactly what I wanted (and wish every app out there could do:) ) This app keeps getting better and better |
Thank you so much for this contribution. I am also using Cloudflare and was veeeery exited when I saw your commit. Thank you! |
First off, sorry if this is not the right space to ask. I am getting a bit stuck in many different information holes 😓 The only part where I get stuck is adding the servicetoken to the custom headers section. Which and what part do I fill in, in what section of the custom proxy headers? e.g. is it the entire "curl -H "CF-Access-Client-Id: <CLIENT_ID>" -H "CF-Access-Client-Secret: <CLIENT_SECRET>" https://app.example.com" into header value? and then with a random header name? Or is it split up, like header name: client id, value: secret? Another note, is the last part (url) the same url as you use for the server endpoint url? running version IOS 1.116.1 |
@DoubleDennis can you have a look at this guide (if you haven't already), follow steps at bottom of the page (under "In the Immich app:") Reminds me i need to merge the guide elsewhere as the author of the upstream fork isn't responding. The response code 200 is cloudflare presenting the login page very likely |
@matejkramny you are my hero! Thank you so much, that was the last peace of the puzzle <3 And this guide in general I was not able to find but seems really good! Definitely recommend this one to become more publicly available. Again, thank you! |
Thank you, I wrote it after merging the PR and should be living in the community documentation. I forgot to merge it |
@matejkramny I noticed a did step 2.1 to 2.3 different as I used CLoudflare's edge certificate instead of using origin server. It was quite easy and didn't require messing around within my Ubuntu server. Would you say that is less secure? Otherwise it could potentially be easier alternative steps. Just trying share my few cents as a newby sharing my learnings to potentially other newbies :) |
@DoubleDennis depends if you have full(strict) encryption between cloudflare and your server. Your server might be presenting a certificate that cloudflare accepts but doesn't trust. I find it useful to try to connect to your server from your machine (effectively try to bypass cloudflare). Also try port scan your server because ufw doesn't apply to docker apparently, if your dockers expose their ports to all interfaces (e.g. The guide I wrote prevents you from bypassing cloudflare via 2 mechanisms:
Edge certificates seem like something different, maybe i'm looking at the wrong thing?
|
Hi,
I've attempted successfully to add authentication for an authentication proxy (cloudflare access in my example).
This would enable users like myself to safely expose immich to the internet without having to worry about security patches etc.
To replicate this, generate cloudflare service token and exchange it for the cookie:
In the Immich app, under Custom Headers set the
cf-access-token
header with thejwt-token
cookie value (as documented here: https://developers.cloudflare.com/cloudflare-one/identity/service-tokens/)Then login and all works well.
I might need your help to bring this over to a state where this could be merged. I couldn't figure out how to do something like
setState
within theHookConsumerWidget
Some todos from what i can tell: