angular-webiを使用して作成したangular5アプリケーションをazure webappサービスにデプロイします。私が何をしたか:Angular5をAzure webappにデプロイする:コンテンツセキュリティポリシー
テストケースのため
CD distの
//汚い部分--aot新しいtestappと
NGビルド--prod ngを:
のgit initを
git add *
git commit -m 'initial commit'
gitがリモート紺碧https://[email protected]:443/xxx.git
Gitのプッシュアズールマスター
出力を追加:
にFinished successfully. remote: Running post deployment command(s)... remote: Deployment successful. remote: App container will begin restart within 10 seconds.
をので、すべてがうまくようです。展開が完了した後、私はURLに向かう場合は、私は残念ながら受け取る:
をエラーで/
を取得することはできません:
コンテンツセキュリティポリシー:ページの設定は、「(自分でリソースの読み込みをブロックdefault-src http://xxx.azurewebsites.net ")。
私が今までに見たすべてのチュートリアルまたは例(1つ)その点でCSPや何かを気にしないでください。どんな助け? https://www.henrihietala.fi/how-to-secure-your-asp-net-azure-web-app/:
ご回答ありがとうございます。私はdistにweb.configを作成し、repoに追加してプッシュしました。何も起こっていない、同じ問題です。 ; スタイル-srcの <= "コンテンツのセキュリティ・ポリシー" の値=」 デフォルト-srcの '自己' の名前を追加します。ファイルの内容はこれです'self' 'unsafe-inline'; script-src 'self' https://*.azurewebsites.net; connect-src wss:https :; " /> customHeaders> httpProtocol> –
Baerree