module FacebookCanvas
This middleware modifies the `REQUEST_METHOD` if needed and should be inserted after the middleware `Rack::MethodOverride`
All requests coming from Facebook to our canvas are POST requests. We need to check whether the request was originally a GET request. We assume that Rails inserts a hidden parameter called `utf8` for all non GET requests.
So if this parameter is missing, the request is a `GET` request and therefor we force the `REQUEST_METHOD` to GET.
Addionally you can restrict `REQUEST_METHOD` rewriting by providing a `custom_filter` block.
stolen from: github.com/mkdynamic/omniauth-facebook/blob/master/lib/omniauth/facebook/signed_request.rb
Constants
- VERSION
Public Class Methods
inside!(env)
click to toggle source
# File lib/facebook_canvas.rb, line 13 def self.inside!(env) Middleware.inside!(env) end
inside?(env)
click to toggle source
# File lib/facebook_canvas.rb, line 9 def self.inside?(env) Middleware.inside?(env) end