I am trying to use JWT Authentication for WP REST API. I am able to generate bearer tokens and validate them using POST /jwt-auth/v1/token and also validate the token using POST /jwt-auth/v1/token/validate.
When I try to use WP REST API from another application, I get the following error:
{
"code": "jwt_auth_bad_config",
"message": "JWT is not configurated properly, please contact the admin",
"data": {
"status": 403
}
}
I have followed the setup instruction, but there is one part that asks to modify .htaccess.
RewriteEngine on
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule ^(.*) - [E=HTTP_AUTHORIZATION:%1]
But since DevKinsta uses nginx instead of apache there is no .htaccess I can find.
I found this issue Directive for NGINX · Issue #194 · Tmeister/wp-api-jwt-auth · GitHub
fastcgi_pass_header Authorization;
How can I add this to the nginx config in DevKinsta?