elsif params[:access_token] params[:access_token] end end def authenticated_user if access_token token = OauthAccessToken.find_by_key(access_token) raise NotAuthorized unless token token.user else nil end end Monday, July 30, 12
false for r in routes match = req.path.search(r) >= 0 break if match return next() unless match req.headers['host'] = endpoint end = res.end res.end = -> console.log "#{req.method}: #{req.path} - #{res.statusCode}" end.call(res) proxy.proxyRequest req, res, host: endpoint port: endpointPort server.coffee Monday, July 30, 12