You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

在SmartEdit中集成JS-storefront时遇权限报错及加载异常求助

Fixing "Not Allowed to Override This Storefront" Error in SmartEdit Integration

Hey there, let's get this sorted out! That error you're seeing (Uncaught Error: https://127.0.0.1:9002 is not allowed to override this storefront) happens because SmartEdit restricts which storefront domains can connect to it—your local URL just isn't on its whitelist yet. Here are the steps to fix it:

1. Update SmartEdit's Allowed Origins Configuration

SmartEdit uses a list of trusted origins to control which storefronts can integrate with it. You need to add your local storefront URL to this list:

  • If using Backoffice: Log into your Commerce Backoffice, navigate to the SmartEdit configuration settings (usually under System > Configuration > SmartEdit), and add https://127.0.0.1:9002 to the Allowed Origin Patterns field. Don't forget to save your changes!
  • If running a local SmartEdit instance: Locate the smartedit.webapp.properties file (typically in your hybris installation's config folder), find the line starting with smartedit.allowed.origin.patterns, and append https://127.0.0.1:9002 to the existing values. For example:
    smartedit.allowed.origin.patterns=https://your-production-storefront.com,https://127.0.0.1:9002
    
    Restart your SmartEdit server after making this change.

2. Verify Spartacus Storefront Configuration

Double-check that your Spartacus setup is pointing to the correct SmartEdit instance and that there are no conflicting origin settings:

  • In your Spartacus app's app.module.ts, ensure the smartEdit configuration includes the correct SmartEdit base URL. You don't need to whitelist your storefront here, but making sure the connection details are right avoids extra issues.

3. Clear Browser Cache or Test in Incognito Mode

Sometimes cached security policies can cause this error to persist even after updating configurations. Clear your browser's cache, cookies, and site data, or open a private/incognito window to test the integration again.

4. Try Using localhost Instead of 127.0.0.1 (Optional)

If the above steps don't work, try accessing your storefront at https://localhost:9002 instead, and add that URL to SmartEdit's allowed origins list too. Some environments handle localhost and 127.0.0.1 as separate origins, so covering both can help.

After completing these steps, reload both your Spartacus storefront and SmartEdit—your loading spinner should stop, and the integration should work as expected!

内容的提问来源于stack exchange,提问作者Suresh

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.06 18:49:06