Skip to content

feat: Add cross origin extension host

Paul Slaughter requested to merge 150-setup-cross-origin-extension-host into main

Description

  • Setting up cross origin extension host is necessary security step for the extension marketplace.
  • This is behind a feature flag so that we can control from the Rails app when this is enabled.
  • If this was enabled by default, it would break the Web IDE for self-managed customers that cannot reach to gitlab-static.net.

Screenshots

After this patch is applied 👇

diff --git a/packages/example/src/components/WebIde.vue b/packages/example/src/components/WebIde.vue
index 0b7b72f..fb67297 100644
--- a/packages/example/src/components/WebIde.vue
+++ b/packages/example/src/components/WebIde.vue
@@ -55,6 +55,9 @@ const getConfigFromExample = (exampleConfig: ExampleConfigClientOnly) => {
     telemetryEnabled,
     ref,
     auth: getAuthConfigFromExample(exampleConfig),
+    featureFlags: {
+      crossOriginExtensionHost: true,
+    },
   };
 };
 
Screenshots
Before After
Screenshot_2024-03-01_at_1.57.45_AM Screenshot_2024-03-01_at_1.57.24_AM
Screenshot_2024-03-01_at_2.33.34_AM Screenshot_2024-03-01_at_2.33.53_AM
Edited by Paul Slaughter

Merge request reports