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

Pass through some proxy related headers to Django for auto header-based signin #42

Closed
wants to merge 1 commit into from

Conversation

LukasdeBoer
Copy link

linuxserver.io


  • I have read the contributing guideline and understand that I have made the correct modifications

Description:

This is very useful for allowing users to auto-signin based on headers. Removes the run hack needed here: babybuddy/babybuddy#643 (comment).

Benefits of this PR and context:

It's very useful when people are using it as an iframe, e.g. in home assistant, you don't want to be logging in every time you're using this tool.

How Has This Been Tested?

I've tested this locally. Without setting the flags, the tool works without any change in behavior. However, by setting:

REVERSE_PROXY_AUTH=true
PROXY_HEADER=HTTP_X_REMOTE_USER

and adding

proxy_set_header X-Remote-User 'yourusername';

to the nginx default template, you can allow auto signin of this user.

Source / References:

babybuddy/babybuddy#643 (comment)

This is very useful for allowing users to auto-signin based on headers. Removes the run hack needed here: babybuddy/babybuddy#643 (comment)
Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Thanks for opening this pull request! Be sure to follow the pull request template!

@LinuxServer-CI
Copy link
Contributor

I am a bot, here are the test results for this PR:
https://ci-tests.linuxserver.io/lspipepr/babybuddy/v2.7.0-pkg-1ca837e7-dev-8a944308d2430777db4d8737943e319199ea5703-pr-42/index.html
https://ci-tests.linuxserver.io/lspipepr/babybuddy/v2.7.0-pkg-1ca837e7-dev-8a944308d2430777db4d8737943e319199ea5703-pr-42/shellcheck-result.xml

Tag Passed
amd64-v2.7.0-pkg-1ca837e7-dev-8a944308d2430777db4d8737943e319199ea5703-pr-42
arm64v8-v2.7.0-pkg-1ca837e7-dev-8a944308d2430777db4d8737943e319199ea5703-pr-42

@aptalca
Copy link
Member

aptalca commented Dec 31, 2024

Can't you set those env vars in the docker run or compose? They do not get processed during init, just set as is.

@LukasdeBoer
Copy link
Author

Wow... derp. I was 100% sure I tested that but without this change it just works...closing this. Apologies for wasting your time!

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

Successfully merging this pull request may close these issues.

3 participants