<@U04UQ68083H> Is it possible to configure wildcar...
# ory-copilot
g
@chilly-king-10285 Is it possible to configure wildcard subdomains into selfservice allowed return urls and passkey origins?
b
A message from kapa.ai
Yes, it is possible to configure wildcard subdomains for both self-service allowed return URLs and passkey origins. For the self-service allowed return URLs, you can specify a wildcard subdomain in the Ory Kratos configuration file. Here is an example:
Copy code
yaml selfservice:     allowed_return_urls:       - https://*.<http://myapp.com/|myapp.com/>
In this example, any subdomain of
<http://myapp.com|myapp.com>
is allowed as a return URL ([source](https://www.ory.sh/docs/kratos/concepts/browser-redirect-flow-completion#redirection)). For the passkey origins, you can use a wildcard subdomain in the Ory API project configuration. Here is an example:
Copy code
json 'cors_admin': {   'properties': {     'enabled': {       'description': 'Whether CORS is enabled for this endpoint.',       'type': 'boolean'     },     'origins': {       'description': 'The allowed origins. Use `*` to allow all origins. A wildcard can also be used in the subdomain, i.e. `https://*.<http://example.com|example.com>` will allow all origins on all subdomains of `<http://example.com|example.com>`.',       'items': {         'type': 'string'       },       'type': 'array'     }   },   'type': 'object' }
In this example, any subdomain of
<http://example.com|example.com>
is allowed as an origin ([source](https://www.ory.sh/docs/reference/api#ory-apis---project---methods---setproject---request-body)).