oscarotero / psr7-middlewares

[DEPRECATED] Collection of PSR-7 middlewares

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

https middleware

jimblue opened this issue · comments

Hello,

Actually it's not possible to activate or deactivate https middleware by passing an argument like for www middleware does :

Middleware::Www(true)

This is really useful when switching from a development to production environment.

Is it possible to add this function?

Thank you so much.

That's good idea. I'm implementing this 👍

Great ! :)

I've commited a fix for this. Can you check if it works fine?
Thanks

That's rock 😄 !

You can definitely make the release for composer hehe

Thank you so much @oscarotero

Hey everyone, what about using composition for that?

Middleware::Toggle(Middleware::Www(), true)
Middleware::Toggle(Middleware::Https(), false)

Hi!

I'm using it like this and that work well: Middleware::Www(true)

Why do you want an other way to switch on/off ?

OK :)

3.20 released