File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -121,6 +121,19 @@ function buildRedirects() {
121121 <action type="Redirect" url="https://{C:2}/{R:1}" redirectType="Permanent" />
122122 </rule>
123123 <!--END SSL-->
124+ <!--BEGIN Bracket-in-URL proxy - must come before trailing slash rule -->
125+ <rule name="Next.js static assets bracket-in-URL proxy" stopProcessing="true">
126+ <match url="^_next/static/(.*)\\[(.*)\\](.*)$" ignoreCase="true" />
127+ <conditions>
128+ <add input="{HTTP_HOST}" pattern="^(?:www.)?(.*)$" />
129+ </conditions>
130+ <action type="Rewrite" url="https://primer-docs-preview.github.com{UNENCODED_URL}" appendQueryString="false" />
131+ <serverVariables>
132+ <set name="HTTP_X_UNPROXIED_URL" value="https://primer-docs-preview.github.com{UNENCODED_URL}" />
133+ <set name="HTTP_X_ORIGINAL_HOST" value="{HTTP_HOST}" />
134+ </serverVariables>
135+ </rule>
136+ <!--END Bracket-in-URL proxy -->
124137 <!--BEGIN Trailing slash enforcement-->
125138 <rule name="Add trailing slash" stopProcessing="true">
126139 <match url="(.*[^/])$" />
You can’t perform that action at this time.
0 commit comments