When the checkAudience option is false, we need to force our audience to the incoming host, otherwise persona will fail all requests with a miss-matched audience.
Alternatively, this could be the default if checkAudience was false, and audience was undefined, but it made sense to me to depend on checkAudience alone.
This allows, for example, development on localhost, while testing with another computer browsing to the site via ip address. (I frequently test with my iPad this way).
Also, apologies for the whitespace removal adding noise to the diff; didn't notice that till submitting the pull request; my editor does that automatically, and I didn't think about it.
When the
checkAudience
option is false, we need to force our audience to the incoming host, otherwise persona will fail all requests with a miss-matched audience.Alternatively, this could be the default if
checkAudience
was false, andaudience
was undefined, but it made sense to me to depend oncheckAudience
alone.This allows, for example, development on localhost, while testing with another computer browsing to the site via ip address. (I frequently test with my iPad this way).