microscopic-answer-24504
08/24/2023, 2:13 PMbland-eye-99092
08/24/2023, 4:15 PMastonishing-plumber-76823
08/24/2023, 4:28 PM<https://www.ory.sh/docs/guides/cors#enable-cors>
but when I do ory get oauth2-config project-id --format json
, I see this under `public`:
"public": {
"cors": {
"allow_credentials": true,
"allowed_headers": [
"Accept",
"Content-Type",
"Content-Length",
"Accept-Language",
"Content-Language",
"Authorization"
],
"allowed_methods": [
"POST",
"GET",
"PUT",
"PATCH",
"DELETE",
"CONNECT",
"HEAD",
"OPTIONS",
"TRACE"
],
"debug": false,
"enabled": false,
"exposed_headers": [
"Cache-Control",
"Expires",
"Last-Modified",
"Pragma",
"Content-Length",
"Content-Language",
"Content-Type"
],
"max_age": 0
},
"tls": {
"enabled": false
}
},
astonishing-plumber-76823
08/24/2023, 4:28 PMsteep-lamp-91158
enabled
is truesteep-lamp-91158
allowed_origins
for enabled to be trueastonishing-plumber-76823
08/24/2023, 4:35 PMory patch project project-id \
--replace '/cors_public/enabled=true' \
--replace '/cors_public/allowed_origins=["some-url"]'
but based on the json and yaml files I get by getting the oauth2 config, I don't see an object called cors_public
anymore.
so, should I change the command to do this instead?
ory patch project project-id \
--replace '/public/cors/enabled=true' \
--replace '/public/cors/allowed_origins=["some-url"]'
would this make sense?steep-lamp-91158
astonishing-plumber-76823
08/24/2023, 4:38 PMsteep-lamp-91158
ory patch project
steep-lamp-91158
steep-lamp-91158
ory get oauth2-config
right?astonishing-plumber-76823
08/24/2023, 4:41 PMory get oauth2-config project-id --format yaml
I did one for yaml format and another for json to see if there's any differences between the twoastonishing-plumber-76823
08/24/2023, 4:42 PMpatch
for the cors is referencing. the public
propertysteep-lamp-91158
ory get project <id>
steep-lamp-91158
steep-lamp-91158
steep-lamp-91158
steep-lamp-91158
steep-lamp-91158
cors_public
top level key does not show up in the CLI output when you have an older CLI version that does not yet support itastonishing-plumber-76823
08/24/2023, 4:59 PMsteep-lamp-91158
steep-lamp-91158
ory patch project e834d575-2f37-4482-903d-d6e789e91c8a \
--replace '/cors_public/enabled=true' \
--replace '/cors_public/origins=["<https://example.com>"]'
steep-lamp-91158
origins
instead of allowed_origins
steep-lamp-91158
astonishing-plumber-76823
08/24/2023, 5:51 PM