0

我正在尝试将服务器设置为允许跨域脚本,以访问我的 appengine 提供的资产:“static.myapp.org”

我将此配置添加到我的 appengine-web.xml,如 https://developers.google.com/appengine/docs/java/config/appconfig中所述

   <static-files>
      <include path="/**.txt" >
        <http-header name="Access-Control-Allow-Origin" value="http://myapp.org" />
      </include>
    </static-files>

设置此配置后,我在尝试上传时收到下一个错误:

Bad configuration: XML error validating /war/WEB-INF/appengine-web.xml against /opt/appengine-java-sdk-1.6.6/docs/appengine-web.xsd
  Caused by: cvc-complex-type.2.2: Element 'include' must have no element [children], and the value must be valid.

任何想法?

4

1 回答 1

0

GAE SDK 1.7.0 中引入了静态内容的 HTTP 标头。您似乎使用的是 1.6.6。

于 2012-09-21T17:41:27.613 回答