JustinBeckwith / yes-https

Say yes to https with express and connect.
MIT License
31 stars 2 forks source link

fix ignoreRequest to be reset on every request #4

Closed michaelfreund closed 7 years ago

michaelfreund commented 7 years ago

The definition of ignoreRequest should be done inside the yes function, so that it is initialized with each request. Otherwise, like with the current implementation, ignoreRequest will live over multiple requests. This causes any request to be ignored, after the first ignored request.

1. req http           -> redirect to https
2. req http (ignored) -> no redirect
3. req http           -> no redirect (ignoreRequest still is true)
michaelfreund commented 7 years ago

@JustinBeckwith We were wondering if the behavior of the implementation is intentional. If so, is there a special reason for this?

JustinBeckwith commented 7 years ago

Nice catch. No reason - just a bug :) Thanks for the fix!

JustinBeckwith commented 5 years ago

:tada: This PR is included in version 1.0.0 :tada:

The release is available on:

Your semantic-release bot :package::rocket: