【发布时间】:2016-01-31 15:52:12
【问题描述】:
我在我的本地系统中安装 piwik 并与 rails 应用程序 集成以跟踪当我使用 iframe 分析数据时出现问题通过 piwik,我想在我的 rails 应用 iframe 中显示 dashboard。但它显示错误
错误 糟糕……请求期间出现问题。可能服务器有一个临时问题,或者您请求的报告可能包含太多数据。请再试一次。如果此错误反复出现,请联系您的 Piwik 管理员寻求帮助。
我的配置文件config.ini.php
cors_domains[] = "*"
enable_framed_pages = 1
enable_framed_settings = 1
trusted_hosts[] = "192.168.1.101"
trusted_hosts[]= "localhost/analytics/piwik/"
在我的萤火虫错误中
Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at http://localhost/analytics/piwik/index.php?date=yesterday&module=Dashboard&action=embeddedIndex&idSite=1%252C2&period=day&idDashboard=1. (Reason: missing token 'x-requested-with' in CORS header 'Access-Control-Allow-Headers' from CORS preflight channel).
我的 erb.slim 文件是
.panel.panel-primary
.panel-heading
h4 Piwik
iframe height="200"sandbox="allow-scripts" width="600px;" src="http://localhost/analytics/piwik/"
【问题讨论】:
标签: php ruby-on-rails iframe cors matomo