Skip to content

Support Forwarded header in Rack::Protection::IPSpoofing #2011

@dentarg

Description

@dentarg

See https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded

Since Rack 3 (rack/rack#1834) the Forwarded is supported (and preferred).

Sinatra does not make use of this:

def forwarded?
@env.include? 'HTTP_X_FORWARDED_HOST'
end

Which one to prefer should probably be exposed to the end-user.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions