Use MIXED_CONTENT_COMPATIBILITY_MODE in PodWebView - #31
Open
jim-daf wants to merge 1 commit into
Open
Conversation
PodWebView is used to render podcast show-notes HTML. The setup called setMixedContentMode(MIXED_CONTENT_ALWAYS_ALLOW), which lets an https page in the WebView load every kind of http sub-resource, including remote scripts. The WebSettings javadoc treats it as the strictly less safe choice. Switch to MIXED_CONTENT_COMPATIBILITY_MODE, which keeps passive sub-resources (cover art, images) loading on https show-notes pages while blocking active mixed content like remote scripts. This matches how Chrome treats mixed content in the address bar and is the right default for podcast show-notes. Assisted-by: Claude (Anthropic)
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.
Closes #30.
PodWebView.setupcalledsetMixedContentMode(WebSettings.MIXED_CONTENT_ALWAYS_ALLOW)for the show-notes WebView. TheWebSettingsjavadoc treatsALWAYS_ALLOWas the strictly less safe choice because it lets an https page load every kind of http sub-resource, including remote scripts.Change
Replace
MIXED_CONTENT_ALWAYS_ALLOWwithMIXED_CONTENT_COMPATIBILITY_MODE.COMPATIBILITY_MODEkeeps passive sub-resources (cover art, podcast thumbnails over http) loading on https show-notes pages while blocking active mixed content like remote scripts. This matches how Chrome treats mixed content in the address bar and is the right default for podcast show notes.One identifier swap, plus a short inline comment recording the trade-off.
Assisted-by: Claude (Anthropic)