Skip to content

Instantly share code, notes, and snippets.



Created Dec 7, 2018
What would you like to do?
IIS server configuration file for self-hosting of Shapespark bundles.
<?xml version="1.0" encoding="UTF-8"?>
IIS site configuration file for Shapespark self-hosting bundles.
Requires URL rewrite extension:
Extract the Shapespark bundle together with this config file to a
folder that is configured as a IIS site (<sites> section of
the applicationhost.config).
<rule name="Set Content-Encoding header for precompressed files">
<match serverVariable="RESPONSE_Content_Encoding" pattern=".*" />
<add input="{REQUEST_URI}" pattern=".(bmp|buf|js|json|ktx|svg|ico)$" />
<action type="Rewrite" value="gzip"/>
<rule name="Enable caching for never changing resources">
<match serverVariable="RESPONSE_Cache_Control" pattern=".*" />
<add input="{REQUEST_URI}" pattern=".*$" />
<action type="Rewrite" value="public, max-age=15552000"/>
<rule name="Disable caching for changing resources">
<match serverVariable="RESPONSE_Cache_Control" pattern=".*" />
<add input="{REQUEST_URI}" pattern="(index.html|cover.json)$" />
<action type="Rewrite" value="no-store, no-cache, must-revalidate, max-age=0"/>
<rule name="Disalow content type guessing">
<match serverVariable="RESPONSE_X_Content_Type_Options" pattern=".*" />
<action type="Rewrite" value="nosniff"/>
<staticContent lockAttributes="isDocFooterFileName">
<mimeMap fileExtension=".buf" mimeType="application/binary" />
<mimeMap fileExtension=".ktx" mimeType="application/binary" />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.