Last active
March 5, 2022 00:11
-
-
Save stefanschmidt/01afe77220fc3b31be50e62d57431631 to your computer and use it in GitHub Desktop.
Charles Proxy rewrite rule to remove object-src 'none'; from HTTPS response headers for PDF files from afaa.com to enable display in Safari avoiding "Blocked Plugin-In" error
This file contains 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
<?xml version='1.0' encoding='UTF-8' ?> | |
<?charles serialisation-version='2.0' ?> | |
<rewriteSet-array> | |
<rewriteSet> | |
<active>true</active> | |
<name>AFAA</name> | |
<hosts> | |
<locationPatterns> | |
<locationMatch> | |
<location> | |
<protocol>https</protocol> | |
<host>www.afaa.com</host> | |
<path>*.pdf</path> | |
</location> | |
<enabled>true</enabled> | |
</locationMatch> | |
</locationPatterns> | |
</hosts> | |
<rules> | |
<rewriteRule> | |
<active>true</active> | |
<ruleType>3</ruleType> | |
<matchHeader>content-security-policy</matchHeader> | |
<matchValue>(.*)object-src 'none';(.*)</matchValue> | |
<matchHeaderRegex>false</matchHeaderRegex> | |
<matchValueRegex>true</matchValueRegex> | |
<matchRequest>false</matchRequest> | |
<matchResponse>true</matchResponse> | |
<newHeader>content-security-policy</newHeader> | |
<newValue>$1$2</newValue> | |
<newHeaderRegex>false</newHeaderRegex> | |
<newValueRegex>false</newValueRegex> | |
<matchWholeValue>false</matchWholeValue> | |
<caseSensitive>false</caseSensitive> | |
<replaceType>1</replaceType> | |
</rewriteRule> | |
</rules> | |
</rewriteSet> | |
</rewriteSet-array> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment