-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathweb.config
37 lines (37 loc) · 1.62 KB
/
web.config
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<rewrite>
<rules>
<rule name="Redirect all cnvh.co requests" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="^(www\.)?cnhv\.co$" />
</conditions>
<action type="Redirect" url="https://www.troyhunt.com/i-now-own-the-coinhive-domain-heres-how-im-fighting-cryptojacking-and-doing-good-things-with-content-security-policies/" redirectType="Permanent" />
</rule>
<rule name="Return modified JS on all .js requests" stopProcessing="true">
<match url="\.js$" />
<action type="Rewrite" url="/coinhive.js" />
</rule>
<rule name="Return modified WASM on all .wasm requests" stopProcessing="true">
<match url="\.wasm$" />
<action type="Rewrite" url="/coinhive_modal_bg.wasm" />
</rule>
<rule name="Redirect requests to root" stopProcessing="true">
<match url="^$" />
<action type="Redirect" url="https://www.troyhunt.com/i-now-own-the-coinhive-domain-heres-how-im-fighting-cryptojacking-and-doing-good-things-with-content-security-policies" redirectType="Permanent" />
</rule>
</rules>
</rewrite>
<staticContent>
<remove fileExtension=".wasm" />
<mimeMap fileExtension=".wasm" mimeType="application/wasm" />
</staticContent>
<httpProtocol>
<customHeaders>
<add name="access-control-allow-origin" value="*" />
</customHeaders>
</httpProtocol>
</system.webServer>
</configuration>