yahoojapan / authorization-proxy

Moved to https://github.com/AthenZ/authorization-proxy
https://github.com/AthenZ/authorization-proxy
Apache License 2.0
35 stars 9 forks source link

verify config.Proxy during startup #51

Closed WindzCUHK closed 1 year ago

WindzCUHK commented 4 years ago

effect

prevent the proxy get in fatal error during runtime https://github.com/yahoojapan/authorization-proxy/blob/6c6a4ee54da058a1efc5d135cdba28462642267b/handler/handler.go#L49-L59

fix

return error if config.Proxy contains invalid values during startup, e.g.

  1. scheme != 'http' || scheme != 'https'
  2. host ~ '@'

https://github.com/yahoojapan/authorization-proxy/blob/6c6a4ee54da058a1efc5d135cdba28462642267b/usecase/authz_proxyd.go#L47-L66

WindzCUHK commented 1 year ago

continue in: https://github.com/AthenZ/authorization-proxy/issues/11