unjs / redirect-ssl

Connect/Express middleware to enforce https using is-https
MIT License
100 stars 15 forks source link

Exclude localhost redirect #29

Closed jetaix closed 4 years ago

jetaix commented 4 years ago

How can I avoid a redirect on my localhost in order to execute my e2e test in local without a ssl certificat ?

I'm trying some trick like: redirectSSL.create({ exclude: ['localhost'] })

ricardogobbosouza commented 4 years ago

Hi @jetaix You are doing it right! The option exclude is for that :smile:

ricardogobbosouza commented 4 years ago

We will update the documentation if the user wanted to disable redirection on localhost.