tuupola / slim-basic-auth

PSR-7 and PSR-15 HTTP Basic Authentication Middleware
MIT License
440 stars 66 forks source link

Remove https header check #94

Closed tuupola closed 4 years ago

tuupola commented 4 years ago

This reverts commit c27776425c007d2c216899caaacda8d527f798ef. There is two reasons for reverting.

  1. There is no difference between setting secure to false and trusting an arbitrary header.
  2. It is not this middlewares responsibility work around insecure HTTPS proxying.

As an alternative set secure to false or use a middleware which checks the X-Forwarded-Proto etc headers and sets the https method accordingly. It is still fake sense of security though.