2016-06-18 19 views
0

我的index.html文檔已部署到www.lorem.io存儲桶,其餘資源部署到cdn.lorem.io存儲桶。這兩個存儲桶都有自己的Cloudfront分配。當來訪https://www.lorem.io/我收到以下錯誤:Ember應用程序部署到多個桶時的安全性錯誤

Uncaught SecurityError: Failed to execute 'replaceState' on 'History': A history state object with URL ' https://cdn.lorem.io/ ' cannot be created in a document with origin ' https://www.lorem.io ' and URL ' https://www.lorem.io/ '.

回答

1

你ember.js配置文件定義rootURL"https://cdn.lorem.io"這是不對的。當訪問lorem.io你的rootURL應該是"https://www.lorem.io"

也許你的意思是baseURL。有關rootURLbaseURL之間的差異,請參閱this explanation

警告:請記住,該baseURLgets deprecated在燼2.7。

0

我們的locationType設置在我們的配置文件中是hash正在生產中。

在ember.js配置文件,你可以改變你的locationType爲hash,然後再試一次:

ENV.locationType = 'hash'; 

From Guide

From a discussion on github

+0

我真的想使用'history'保持爲我的'locationType' –

相關問題