Skip to content
It's Vapor Week! Celebrating 10 Years of Vapor Read more

Instance PropertyNIOHTTP1

forwarded

Convenience for accessing the Forwarded header. This header is added by proxies to pass information about the original request.
var forwarded: [HTTPHeaders.Forwarded] { get set }

Discussion

Parsing is supported for deprecated headers like Via and X-Forwarded-For. Values are always serialized to the recommended Forwarded header.

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