Skip to content

[BB-7138] feat: reuse code that generates allow_cors_origins

Maxim Beder requested to merge maxim/bb-7138-refactor-allowed-cors-origin into main

Description

BB-7138

This MR addressed to problems:

  • The code that generated a list of allowed_cors_origins was duplicated in multiple places
  • There was no way to access a list of all instance domains from the plugin module

Concerns

Since the list of allowed_cors_origins contains the list of all domains an instance has, perhaps it should be renamed to something that would convey this information, as it could be useful for other purposes.

Also, during testing it was noticed that allowed_cors_origins didn't have https:// in the domains, so it was decided to add it.

Checklist

If any of the items below is not applicable, do not remove them, but put a check in it.

  • All providers include the new feature/change
  • All affected providers can provision new clusters
  • Unit tests are added/updated
  • Documentation is added/updated
  • The TOOLS_CONTAINER_IMAGE_VERSION in ci_vars.yml is updated
  • The grove-template repository is updated
Edited by Maxim Beder

Merge request reports