Permalink
Browse files

valid url for opensearch description

  • Loading branch information...
1 parent e22ec3c commit 98b6b4a706444c65c7b5ab9232314e12eb7e9066 @beaucollins committed May 1, 2012
Showing with 3 additions and 3 deletions.
  1. +2 −2 server.coffee
  2. +1 −1 views/opensearch.jade
View
@@ -29,8 +29,8 @@ app.get '/supported', (req, res, next)->
res.send(200, {"x-frame-options":(http_response.headers['x-frame-options'] || false)})
app.get '/opensearch', (req, res, next)->
- # res.setHeader 'content-type', 'application/opensearchdescription+xml'
- res.render 'opensearch'
+ res.setHeader 'content-type', 'application/opensearchdescription+xml' if req.is('application/opensearchdescription+xml')
+ res.render 'opensearch', url_template:'http://' + req.headers.host + '/?{searchTerms}'
find = (u, ua, cb, hops = 5)=>
View
@@ -4,4 +4,4 @@ OpenSearchDescription(xmlns="http://a9.com/-/spec/opensearch/1.1/")
Description Use responsiv.es to analyze your responsive CSS.
Tags css responsive
Contact beaucollins@gmail.com
- Url(type="text/html",template="/?{searchTerms}")
+ Url(type="text/html",template=url_template)

0 comments on commit 98b6b4a

Please sign in to comment.