为什么我的Google Apps脚本文件中出现CSP错误?

时间:2018-10-19 14:26:47

标签: angularjs google-apps-script web-applications

我的Google Apps脚本文件有问题。它基本上反映了客房预订系统,直到最近它开始出现一些问题。我遇到了内容安全策略问题,当我尝试在FireFox上运行该问题时会显示该问题。

Current issue that I'm seeing.

当我使用Chrome时,出现另一个错误:

enter image description here

我有一个管理控制台,可让我选择接受还是拒绝“房间预订”。当前,唯一显示任何房间的帐户是我的。

预期外观应该是这样,房间如下所示:enter image description here

但是,其他管理员看到的是这样的:

enter image description here

它没有显示CSS,但我遇到了以上任一错误。

当前,在我的管理控制台脚本中,有这个文件,这就是问题所在:

<!DOCTYPE HTML>
<?!= HtmlService.createHtmlOutputFromFile('Stylesheet').getContent(); ?>

<html ng-app="directoryApp">

<head>

<script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.5.5/angular.min.js"></script>

</head>

<body>

    <div ng-controller="directoryCtrl" class="container-fluid" ng-init="getEvents(<?= user ?>)">

      <!-- Show loading screen -->
      <?!= HtmlService.createHtmlOutputFromFile('Loading').getContent(); ?>
      <?!= HtmlService.createHtmlOutputFromFile('License').getContent(); ?>

      <!-- Show notifications -->
      <div id="page_top" class="notify lead" ng-if="notification">{{notification}}</div>

        <div class="row">
            <div class="col-xs-12">

                <div ng-show="events" ng-csp>
                  <?!= HtmlService.createHtmlOutputFromFile('AC-Navigation').getContent(); ?>
                </div>

                <div ng-show="events.length && !editing && !settings">

                  <?!= HtmlService.createHtmlOutputFromFile('AC-List').getContent(); ?>

                </div>

                <div class="col-xs-10 col-xs-offset-1" ng-show="editing">
                  <?!= HtmlService.createHtmlOutputFromFile('AC-Single').getContent(); ?>
                </div>

                <div class="col-xs-6 col-xs-offset-3" ng-show="settings">
                  <?!= HtmlService.createHtmlOutputFromFile('AC-Settings').getContent(); ?>
                </div>

            </div>
        </div>
        </div>

    </body>

    </html>

    <?!= HtmlService.createHtmlOutputFromFile('AC-JavaScript').getContent(); ?>

我试图查看一些Angular文档,其中涉及使用ng-csp的问题,

实际的预订系统本身没有问题,只是我无法在管理控制台上看到其余的代码,因此我无法在我的应用程序上接受/拒绝房间请求。

我还尝试使用meta来允许通过Content-Security-Policy进行的所有操作。

任何指导将不胜感激!

0 个答案:

没有答案