I've been getting a lot of 404 notifications on the .well-known/traffic-advice location on my server. After doing some research it turns out the Chrome Privacy Preserving Prefetch Proxy tries to find instructions on prefetching content from the website.
I would like to add this file to give a proper response, but the file needs a specific MIME type: application/trafficadvice+json
In IIS it is easy to add a new MIME type for a specific extension, but in this case the 'traffic-advise' file has no extension. Also it's not advisable to specify a MIME type for all extension-less files.
How can I add the MIME type for this specific file in IIS (or web.config)?
As other solutions did not work for me, I used the following workaround to make it work:
<system.webServer>
<staticContent>
<mimeMap fileExtension=".tdjson" mimeType="application/trafficadvice+json" />
</staticContent>
</system.webServer>
<rule name="wellknown trafficadvice" stopProcessing="true">
<match url="^\.well-known\/traffic-advice$" ignoreCase="true" />
<action type="Redirect" url="/.well-known/traffic-advice.tdjson" redirectType="Permanent" />
</rule>