AnsibleUser
AnsibleUser

Reputation: 55

How to add header X-XSS-Protection 1; mode=block via appcmd

I am able to add the below mentioned header via UI in IIS and other simple headers via command line (appcmd), but this one seems cryptic.. not able to get it. Throwing syntax errors whatever i try. Any help is appreciated ...

X-XSS-Protection 1; mode=block

Upvotes: 0

Views: 3357

Answers (1)

AnsibleUser
AnsibleUser

Reputation: 55

Looks like i found it

%windir%\system32\inetsrv\appcmd.exe set config -section:system.webServer/httpProtocol /+"customHeaders.[name='X-XSS-Protection',value='1; mode=block']"

Upvotes: 3

Related Questions