Configure url rewrite for OAuth
At Nuts uses the RFC8615 spec for .well-known URIs (https://www.rfc-editor.org/rfc/rfc8615.html). This means well-known resources, like the OAuth server, are resolved from the root of the (sub)domain. If you host the Nuts node on a subpath, you need to do some URL rewriting.
On Azure Application Gateway, it would look something like this (given your Nuts node runs on /nuts):
// Route well-known endpoints to Nuts node
// The URL:
// https://<host>/.well-known/oauth-authorization-server/nuts/oauth2/<subject-id>
// should map to:
// /.well-known/oauth-authorization-server/oauth2/<subject-id>
path: '/.well-known/oauth-authorization-server/nuts'
rewriteCondition: '/.well-known/oauth-authorization-server/nuts(.*)'
rewriteRule: '/.well-known/oauth-authorization-server{var_uri_path_1}'
No Comments