Skip to content

initial env var ingestion for rev proxy configs - #586

Open
thelamer wants to merge 2 commits into
masterfrom
env-templating
Open

initial env var ingestion for rev proxy configs#586
thelamer wants to merge 2 commits into
masterfrom
env-templating

Conversation

@thelamer

Copy link
Copy Markdown
Member

I have tested this pretty thoroughly at this point, it is bolt on logic so will not have an effect on any existing setups unless you can think of any possible reason someone would be passing an env var starting with "PROXY_CONFIG_" to a swag container.

The most basic string is incredibly useful to do subdomain setup to a port using a service name as :

- 'PROXY_CONFIG_WEBTOP={"port": 3000}'

This basically just works in most cases subdomain to a port, but all the options are there to get way more complex like in the case of Plex:

 PROXY_CONFIG_PLEX: '{"port":32400,"proxy_redirect_off":true,"buffering_off":true,"proxy_set_headers":[{"key":"X-Plex-Client-Identifier","value":"$http_x_plex_client_identifier"},{"key":"X-Plex-Device","value":"$http_x_plex_device"},{"key":"X-Plex-Device-Name","value":"$http_x_plex_device_name"},{"key":"X-Plex-Platform","value":"$http_x_plex_platform"},{"key":"X-Plex-Platform-Version","value":"$http_x_plex_platform_version"},{"key":"X-Plex-Product","value":"$http_x_plex_product"},{"key":"X-Plex-Token","value":"$http_x_plex_token"},{"key":"X-Plex-Version","value":"$http_x_plex_version"},{"key":"X-Plex-Nocache","value":"$http_x_plex_nocache"},{"key":"X-Plex-Provides","value":"$http_x_plex_provides"},{"key":"X-Plex-Device-Vendor","value":"$http_x_plex_device_vendor"},{"key":"X-Plex-Model","value":"$http_x_plex_model"}],"extra_locations":[{"path":"/library/streams/","custom_directives":["proxy_pass_request_headers off"]}]}'

The docced examples show the - array member syntax with escaped $ being double $$ and the whole thing being wrapped in single quotes but the object syntax like the plex example above is much more forgiving.

I think this is a good first step and maybe down the line we can look at using jinja templates for the ini generation and get everything in an env var format if possible.

@thelamer
thelamer requested a review from a teamSeptember 4, 2025 15:07
@LinuxServer-CILinuxServer-CI moved this to PRs Ready For Team Review in Issue & PR TrackerSep 4, 2025
@LinuxServer-CILinuxServer-CI moved this from PRs Ready For Team Review to PRs in Issue & PR TrackerSep 4, 2025
@LinuxServer-CI

Copy link
Copy Markdown
Contributor

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-swag:5.0.0-pkg-a45fe600-dev-10cd287728a6f332e401084358cfeb3a1ab801f9-pr-586

@LinuxServer-CI

Copy link
Copy Markdown
Contributor

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-swag:5.0.0-pkg-a45fe600-dev-d6cfc8d3e2d9cd9fecee13e34126f461931842cc-pr-586

@thelamer

Copy link
Copy Markdown
MemberAuthor

Made the env tamplates directory a dedicated thing so it will not delete anyone's custom configs.

@LinuxServer-CI

Copy link
Copy Markdown
Contributor

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-swag:5.0.0-pkg-2deef27a-dev-218b4ab8ab3e06a62e930c2419cfcdada600fca3-pr-586

@LinuxServer-CI

Copy link
Copy Markdown
Contributor

I am a bot, here is the pushed image/manifest for this PR:

ghcr.io/linuxserver/lspipepr-swag:5.1.0-pkg-d6208c74-dev-c27162ee94e33cc84a72f6ecaba8664f58438937-pr-586

@LinuxServer-CI

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity. This might be due to missing feedback from OP. It will be closed if no further activity occurs. Thank you for your contributions.

@LinuxServer-CILinuxServer-CI moved this from PRs to PRs Ready For Team Review in Issue & PR TrackerNov 11, 2025
@LinuxServer-CILinuxServer-CI moved this from PRs Ready For Team Review to Done in Issue & PR TrackerJan 11, 2026
@drizuiddrizuid reopened this Jan 11, 2026
@LinuxServer-CILinuxServer-CI moved this from Done to PRs Ready For Team Review in Issue & PR TrackerJan 11, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

work-in-progressStale exempt

Projects

Status: PRs Ready For Team Review

Development

Successfully merging this pull request may close these issues.

4 participants

@thelamer@LinuxServer-CI@nemchik@drizuid