labstack / echo

High performance, minimalist Go web framework
https://echo.labstack.com
MIT License
29.94k stars 2.23k forks source link

Support 'Forwarded' header #2694

Open zdebel opened 3 weeks ago

zdebel commented 3 weeks ago

Please add support for 'Forwarded' header.

https://github.com/labstack/echo/blob/master/context.go#L275 here the Scheme method should also support Forwarded header ( https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Forwarded ). This header is for example used by Google in their openid oauth2 provider. I've stumbled across this issue in another project and proposed a fix. In a perfect world, said project should simply call Scheme() ( https://github.com/thomiceli/opengist/pull/359 ).