canonical / discourse-k8s-operator

discourse-k8s-operator - charm repository.
Apache License 2.0
7 stars 5 forks source link

Automatically include `external_hostname` & `s3_cdn_url` in CORS origin (`cors_origin`) #218

Open hloeung opened 7 months ago

hloeung commented 7 months ago

Enhancement Proposal

Hi,

I think it would be nice to automatically include the configured external_hostname & s3_cdn_url in the CORS origin (cors_origin).

Currently, cors_origin is configurable so we can set that to include both, but it would be nice if the charm would automatically do this for us. This reduces the chance of human error where updating the other settings would make it less of an issue or miss updating cors_origin.

For external_hostname, I think it would need to take into account force_https to see if it should add https:// or just http://.

For s3_cdn_url, it would add it as is.

cbartz commented 3 weeks ago

@javierdelapuente Can you have a look if this is feasible and create a ticket in the backlog, please?

cbartz commented 3 weeks ago

@javierdelapuente There is also https://warthogs.atlassian.net/browse/ISD-1817, I was not aware that all issues in this repo are synced to jira. Sorry about that.