[go: up one dir, main page]

Draft: Geo: Add internal URLs to ActionCable allowed origins

What does this MR do and why?

Add internal URLs to ActionCable allowed origins

This MR fixes a bug where websockets are not working on secondaries because their origin is not recognised by the primary when proxied from the secondary. as the origin is the secondary internal URL.

Note: It is not advised to make database queries in initializers.

However, we need to know the internal URLs of the Geo Nodes to be able to build the allow-list for Action Cable. An alternative would be adding a setting where the users add manually the URLs of all their sites, but:

  1. this is prone to manual copy-paste errors;
  2. this could be dangerous as users could setup a regexp to allow requests from everywhere.

Edit: given the massive failures in the pipeline, I am revising the statement that this is a good idea vs. adding a new setting!

References

Relates to: #579074

MR acceptance checklist

Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

Edited by Chloe Fons

Merge request reports

Loading