Skip to content

Instantly share code, notes, and snippets.

@ebruchez
Created April 8, 2014 01:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ebruchez/10079254 to your computer and use it in GitHub Desktop.
Save ebruchez/10079254 to your computer and use it in GitHub Desktop.
Charles: Add admin auth headers
<?xml version='1.0' encoding='UTF-8' ?>
<?charles serialisation-version='2.0' ?>
<rewriteSet-array>
<rewriteSet>
<active>true</active>
<name>Add admin auth headers</name>
<hosts>
<locationPatterns>
<locationMatch>
<location>
<host>localhost</host>
<port>8080</port>
</location>
<enabled>true</enabled>
</locationMatch>
</locationPatterns>
</hosts>
<rules>
<rewriteRule>
<active>true</active>
<ruleType>1</ruleType>
<matchHeader></matchHeader>
<matchValue></matchValue>
<matchHeaderRegex>false</matchHeaderRegex>
<matchValueRegex>false</matchValueRegex>
<matchRequest>true</matchRequest>
<matchResponse>false</matchResponse>
<newHeader>My-Username-Header</newHeader>
<newValue>admin</newValue>
<newHeaderRegex>false</newHeaderRegex>
<newValueRegex>false</newValueRegex>
<matchWholeValue>false</matchWholeValue>
<replaceType>2</replaceType>
</rewriteRule>
<rewriteRule>
<active>true</active>
<ruleType>1</ruleType>
<matchHeader></matchHeader>
<matchValue></matchValue>
<matchHeaderRegex>false</matchHeaderRegex>
<matchValueRegex>false</matchValueRegex>
<matchRequest>true</matchRequest>
<matchResponse>false</matchResponse>
<newHeader>My-Roles-Header</newHeader>
<newValue>orbeon-user,admin</newValue>
<newHeaderRegex>false</newHeaderRegex>
<newValueRegex>false</newValueRegex>
<matchWholeValue>false</matchWholeValue>
<replaceType>2</replaceType>
</rewriteRule>
<rewriteRule>
<active>true</active>
<ruleType>1</ruleType>
<matchHeader></matchHeader>
<matchValue></matchValue>
<matchHeaderRegex>false</matchHeaderRegex>
<matchValueRegex>false</matchValueRegex>
<matchRequest>true</matchRequest>
<matchResponse>false</matchResponse>
<newHeader>My-Group-Header</newHeader>
<newValue>orbeon-user</newValue>
<newHeaderRegex>false</newHeaderRegex>
<newValueRegex>false</newValueRegex>
<matchWholeValue>false</matchWholeValue>
<replaceType>2</replaceType>
</rewriteRule>
</rules>
</rewriteSet>
</rewriteSet-array>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment