Custom Request Headers for Reverse Proxy Auth - #518
Open
404Simon wants to merge 1 commit into
Open
Conversation
404Simon
force-pushed
the
custom-header-auth
branch
from
June 20, 2026 14:13
19edcb4 to
7843497
Compare
Adds an 'Advanced' dropdown to the server-address overlay form allowing users to configure custom HTTP headers (key/value pairs) for reverse proxy authentication.
404Simon
force-pushed
the
custom-header-auth
branch
from
June 20, 2026 14:16
7843497 to
7e155c8
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Users behind reverse proxies that want to use header-based authentication cannot log in or stream media because the client doesnt allow adding these auth headers.
I use Pangolin and really like this feature as it gives me an extra layer of security.
Solution
Adds an expandable section to the server-address entry overlay where users can configure arbitrary HTTP header key/value pairs.
Three injection points
CefResourceRequestHandler::on_before_resource_loadCefURLRequestinServerProbeClient/System/Info/Public)http-header-fieldsoptionWhat changed
src/config/src/lib.rs: newcustom_headers: Vec<(String, String)>persisted insettings.jsonsrc/jfn_cef/src/client_impl/resource_request.rs:CefResourceRequestHandlerthat injects headers into browser requests matching the configured server URLsrc/jfn_cef/src/client_impl/request.rs:CefRequestHandlerthat returns the resource handler per framesrc/jfn_cef/src/client_impl.rs: wiredrequest_handlerintowrap_client!src/jfn_cef/src/injection.rs: addedgetCustomHeaders/setCustomHeadersnative IPC functionssrc/jfn_cef/src/business_overlay.rs: IPC handlers for header save/load; headers on connectivity probe requestssrc/jfn_cef/src/business_web.rs: passes headers to mpv atplayerLoadtimesrc/mpv/src/api.rs: syncmpv_set_property_string, setshttp-header-fieldson the mpv handle beforeloadfilesrc/web/overlay.html:<details>element with header key/value rowssrc/web/overlay.css: dark-theme styling matching existing form elementssrc/web/overlay.js: dynamic header row builder, load/save via IPCsrc/web/overlay.lang.js: English i18n strings for the advanced UIUsage
Headers persist in
settings.jsonacross restarts.