The preview server and web.config now follow the same URLs as nginx, without the SPA fallback. Lighthouse exceptions need a recorded reason and the 404 page is audited through an opt-in route. The deploy checks the build first and the served result afterwards. The IIS rules stay unverified until a host exists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
93 lines
5.3 KiB
XML
93 lines
5.3 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- Gegenereerd door web/config/serverConfig.ts (pnpm server-config). Niet handmatig aanpassen. -->
|
|
<configuration>
|
|
<system.webServer>
|
|
<rewrite>
|
|
<rules>
|
|
<rule name="www naar andreaslop.nl" stopProcessing="true">
|
|
<match url="(.*)" />
|
|
<conditions>
|
|
<add input="{HTTP_HOST}" pattern="^www\.andreaslop\.nl$" />
|
|
</conditions>
|
|
<action type="Redirect" url="https://andreaslop.nl/{R:1}" redirectType="Permanent" />
|
|
</rule>
|
|
<rule name="HTTPS" stopProcessing="true">
|
|
<match url="(.*)" />
|
|
<conditions>
|
|
<add input="{HTTPS}" pattern="^OFF$" />
|
|
</conditions>
|
|
<action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
|
|
</rule>
|
|
<rule name="Index naar root" stopProcessing="true">
|
|
<match url="^index(?:\.html)?/*$" />
|
|
<action type="Redirect" url="/" redirectType="Permanent" />
|
|
</rule>
|
|
<rule name="Pagina canoniek" stopProcessing="true">
|
|
<match url="^(over-mij|portfolio|soorten-fotoshoots|soorten-fotoshoots/newborn|soorten-fotoshoots/zwangerschap|soorten-fotoshoots/gezin|soorten-fotoshoots/loveshoot|soorten-fotoshoots/portret|contact|privacyverklaring)(?:\.html)?/*$" />
|
|
<conditions>
|
|
<add input="{R:0}" pattern="^(?:over-mij|portfolio|soorten-fotoshoots|soorten-fotoshoots/newborn|soorten-fotoshoots/zwangerschap|soorten-fotoshoots/gezin|soorten-fotoshoots/loveshoot|soorten-fotoshoots/portret|contact|privacyverklaring)$" ignoreCase="false" negate="true" />
|
|
</conditions>
|
|
<action type="Redirect" url="/{ToLower:{R:1}}" redirectType="Permanent" />
|
|
</rule>
|
|
<rule name="Slash weg" stopProcessing="true">
|
|
<match url="^([^/\\].*?)/+$" />
|
|
<action type="Redirect" url="/{R:1}" redirectType="Permanent" />
|
|
</rule>
|
|
<rule name="404 direct" stopProcessing="true">
|
|
<match url="^404(?:\.html)?$" />
|
|
<action type="CustomResponse" statusCode="404" statusReason="Not Found" statusDescription="Not Found" />
|
|
</rule>
|
|
<rule name="Pagina bestand" stopProcessing="true">
|
|
<match url="^(.+)$" />
|
|
<conditions>
|
|
<add input="{REQUEST_FILENAME}.html" matchType="IsFile" />
|
|
</conditions>
|
|
<action type="Rewrite" url="{R:1}.html" />
|
|
</rule>
|
|
<rule name="Map zonder pagina" stopProcessing="true">
|
|
<match url="^(.+)$" />
|
|
<conditions>
|
|
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" />
|
|
</conditions>
|
|
<action type="CustomResponse" statusCode="404" statusReason="Not Found" statusDescription="Not Found" />
|
|
</rule>
|
|
</rules>
|
|
</rewrite>
|
|
<httpErrors errorMode="Custom" existingResponse="Replace">
|
|
<remove statusCode="404" subStatusCode="-1" />
|
|
<error statusCode="404" subStatusCode="-1" path="/404.html" responseMode="ExecuteURL" />
|
|
</httpErrors>
|
|
<urlCompression doStaticCompression="true" doDynamicCompression="false" />
|
|
<httpProtocol>
|
|
<customHeaders>
|
|
<remove name="X-Powered-By" />
|
|
<add name="Content-Security-Policy" value="default-src 'self'; script-src 'self' https://analytics.slpsoftware.nl; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self'; connect-src 'self' https://analytics.slpsoftware.nl https://o4511795618185216.ingest.de.sentry.io; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'" />
|
|
<add name="Strict-Transport-Security" value="max-age=31536000; includeSubDomains" />
|
|
<add name="X-Content-Type-Options" value="nosniff" />
|
|
<add name="X-Frame-Options" value="DENY" />
|
|
<add name="Referrer-Policy" value="strict-origin-when-cross-origin" />
|
|
</customHeaders>
|
|
</httpProtocol>
|
|
<staticContent>
|
|
<remove fileExtension=".woff2" />
|
|
<mimeMap fileExtension=".woff2" mimeType="font/woff2" />
|
|
<remove fileExtension=".js" />
|
|
<mimeMap fileExtension=".js" mimeType="text/javascript" />
|
|
<remove fileExtension=".svg" />
|
|
<mimeMap fileExtension=".svg" mimeType="image/svg+xml" />
|
|
<remove fileExtension=".json" />
|
|
<mimeMap fileExtension=".json" mimeType="application/json" />
|
|
<remove fileExtension=".xml" />
|
|
<mimeMap fileExtension=".xml" mimeType="text/xml" />
|
|
<clientCache cacheControlMode="DisableCache" />
|
|
</staticContent>
|
|
</system.webServer>
|
|
<location path="assets">
|
|
<system.webServer>
|
|
<staticContent>
|
|
<clientCache cacheControlMode="UseMaxAge" cacheControlMaxAge="365.00:00:00" />
|
|
</staticContent>
|
|
</system.webServer>
|
|
</location>
|
|
</configuration>
|