Fix JS content type not being set on set.js route

This was breaking the Mastodon client-side updates example
in latest Safari with x-content-type-options: nosniff on.
parent 421c1ed8
################################################################################
#
# Set
# Set
#
# Copyright © Aral Balkan.
# Released with ♥ by Ind.ie under the MIT License.
# Copyright © Aral Balkan.
# Released with ♥ by Ind.ie under the MIT License.
# Portions released under the Apache License.
#
################################################################################
......@@ -18,4 +18,5 @@ exports.route = (request, response) ->
response.send '<h1>Error 404: Could not find set.js</h1>'
else
response.status 200
response.type 'js'
response.end data
......@@ -4,8 +4,8 @@
#
# The server for the Set examples.
#
# Copyright © Aral Balkan.
# Released with ♥ by Ind.ie under the MIT License.
# Copyright © Aral Balkan.
# Released with ♥ by Ind.ie under the MIT License.
# Portions released under the Apache License.
#
################################################################################
......@@ -63,5 +63,3 @@ createRoute '/set.js'
app.listen (process.env.PORT || 3000)
console.log '\nServer running… visit http://localhost:3000/ to play with the Set examples.\n'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment