here is a PR for this new feature.
The use case is:
I need to consume the Discourse APIs using User API Keys from JS in some pages reachable in a different location than the domain root. Instead of listing all the locations in the
allowed_user_api_auth_redirectssetting (which will be impossibile if I generate pages dynamically), I can use a wildcard to allow redirect to multiple pages: i.e.
Hope this can be helpful to other people!