Permalink
Browse files

#42 Add info url

  • Loading branch information...
majek committed Jan 6, 2012
1 parent e203719 commit a3250f3a666a569de59dc67eaf433d59b5c9d085
Showing with 11 additions and 0 deletions.
  1. +9 −0 src/chunking-test.coffee
  2. +2 −0 src/sockjs.coffee
View
@@ -22,3 +22,12 @@ exports.app =
[3125, => write('h'); res.end()],
])
return true
info: (req, res, _) ->
info = {
websocket: @options.disabled_transports.indexOf('websocket') is -1,
origins: @options.origins,
}
res.setHeader('Content-Type', 'application/javascript; charset=UTF-8')
res.writeHead(200)
res.end(JSON.stringify(info))
View
@@ -71,6 +71,8 @@ generate_dispatcher = (options) ->
dispatcher = [
['GET', p(''), ['welcome_screen']],
['GET', p('/iframe[0-9-.a-z_]*.html'), ['iframe', 'cache_for', 'expose']],
['OPTIONS', p('/info'), opts_filters],
['GET', p('/info'), ['xhr_cors', 'h_no_cache', 'info', 'expose']],
['OPTIONS', p('/chunking_test'), opts_filters],
['POST', p('/chunking_test'), ['xhr_cors', 'expect_xhr', 'chunking_test']],
['GET', p('/websocket'), ['raw_websocket']],

0 comments on commit a3250f3

Please sign in to comment.