usefulteam / jwt-auth

WordPress JSON Web Token Authentication
https://wordpress.org/plugins/jwt-auth/
124 stars 50 forks source link

"Authorization header not found" after WPEngine deprecated htaccess #79

Closed obp-jared closed 2 years ago

obp-jared commented 2 years ago

Hello,

Our site is hosted on WPEngine and they recently shifted away from .htaccess files and ever since we have been getting the error "Authorization header not found"

We tried adding a web rule through their backend based on similar issues we found but so far have had no luck. Any ideas how we can resolve this?

Here's a screenshot of the web rule we added

obp-jared commented 2 years ago

Eventually got through to a WPEngine support specialist who was able to resolve the issue, this is what they told us:

We added a define to the nginx configuration for the site:

if ($http_authorization ~ "^(.*)"){
    set $rule_0 1;
}
if ($rule_0 = "1"){
    set $http_authorization %1;
}

It was saved, regenerated, and then the cache was cleared