Skip to content

Commit

Permalink
Fix for strict MIME type browser checks
Browse files Browse the repository at this point in the history
  • Loading branch information
nleach999 authored Sep 18, 2020
1 parent e7cecb3 commit 2ebae18
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions WindowsNoRDP/SetupNoVNC.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ Set-WebConfigurationProperty -Filter "/system.webServer/rewrite/globalRules/rule
Add-WebConfiguration -Filter "/system.webServer/rewrite/globalRules/rule[@name='NoVNC Websockify']/conditions" -PSPAth "IIS:\sites" -Value @{input = "{HTTP_HOST}"; pattern = ".*" }
Set-WebConfiguration -Filter "/system.webServer/rewrite/globalRules/rule[@name='NoVNC Websockify']/action" -PSPAth "IIS:\sites" -Value @{type = "Rewrite"; url = "http://localhost:8000/websockify" }

Output-Stage "Fixing Javascript MIME type for browsers that do strict content type validation"
Set-ItemProperty -Path "Registry::HKEY_CLASSES_ROOT\\.js" -Name "Content Type" -Value "text/javascript"

Output-Stage "Resetting IIS"
iisreset

Expand Down

0 comments on commit 2ebae18

Please sign in to comment.