usefulteam / jwt-auth

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

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

Closed obp-jared closed 1 year ago

obp-jared commented 1 year 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 1 year 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