diff options
author | Matthew Wild <mwild1@gmail.com> | 2022-10-31 14:32:02 +0000 |
---|---|---|
committer | Matthew Wild <mwild1@gmail.com> | 2022-10-31 14:32:02 +0000 |
commit | 246d797f8104930ea962c6f85fc380e7a7b4e423 (patch) | |
tree | 1fe96ae7ec0b11b79e10d4594cd3020604d2ce14 /spec/json/pass4.json | |
parent | 20532df52592717027b1cb138da71abc8913ffbf (diff) | |
download | prosody-246d797f8104930ea962c6f85fc380e7a7b4e423.tar.gz prosody-246d797f8104930ea962c6f85fc380e7a7b4e423.zip |
mod_http: Allow disabling CORS in the http_cors_override option and by default
Fixes #1779.
Due to an oversight in the logic, if the user set 'enabled' to false in an
override, it would disable the item's requested CORS settings, but still apply
Prosody's default CORS policy.
This change ensures that 'enabled = false' will now disable CORS entirely for
the requested item.
Due to the new structure of the code, it was necessary to have a flag to say
whether CORS is to be applied at all. Rather than hard-coding 'true' here, I
chose to add a new option: 'http_default_cors_enabled'. This is a boolean that
allows the operator to disable Prosody's default CORS policy entirely (the one
that is used when a module or config does not override it). This makes it
easier to disable CORS and then selectively enable it only on services you
want it on.
Diffstat (limited to 'spec/json/pass4.json')
0 files changed, 0 insertions, 0 deletions