Created
May 11, 2013 08:52
-
-
Save swdyh/5559352 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sinatra' | |
get '/' do | |
<<-EOS | |
<html> | |
<head> | |
<script src="nosniff.js" /></script> | |
<link rel="stylesheet" href="nosniff.css" /> | |
</head> | |
<body>nosniff test</body> | |
</html> | |
EOS | |
end | |
get '/nosniff.js' do | |
content_type 'text/plain' | |
headers 'X-Content-Type-Options' => 'nosniff' | |
'alert("js")' | |
end | |
get '/nosniff.css' do | |
content_type 'text/plain' | |
headers 'X-Content-Type-Options' => 'nosniff' | |
'body { background-color: red; }' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment