mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-28 04:23:32 +01:00
web - bring CSP back differently
This commit is contained in:
@@ -1,30 +1,30 @@
|
||||
<!-- Copyright (C) Microsoft Corporation. All rights reserved. -->
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8" />
|
||||
<!-- Disable pinch zooming -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
|
||||
<!-- Disable pinch zooming -->
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
|
||||
<meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'none'; img-src 'self' https: data: blob: vscode-remote:; media-src 'none'; child-src 'self' {{WEBVIEW_ENDPOINT}}; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' ws: wss: https:; font-src 'self' blob: vscode-remote:;">
|
||||
|
||||
<!-- <meta http-equiv="Content-Security-Policy"
|
||||
content="default-src 'none'; img-src 'self' https: data: blob: vscode-remote:; media-src 'none'; child-src 'self' {{WEBVIEW_ENDPOINT}}; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; connect-src 'self' https:; font-src 'self' blob: vscode-remote:;"> -->
|
||||
<meta id="vscode-workbench-web-configuration" data-settings="{{WORKBENCH_WEB_CONGIGURATION}}">
|
||||
|
||||
<meta id="vscode-workbench-web-configuration" data-settings="{{WORKBENCH_WEB_CONGIGURATION}}">
|
||||
<!-- Workaround to pass remote user data uri-->
|
||||
<meta id="vscode-remote-user-data-uri" data-settings="{{REMOTE_USER_DATA_URI}}">
|
||||
<!-- Workaround to pass remote connection token-->
|
||||
<meta id="vscode-remote-connection-token" data-settings="{{CONNECTION_AUTH_TOKEN}}">
|
||||
</head>
|
||||
<!-- Workaround to pass remote user data uri-->
|
||||
<meta id="vscode-remote-user-data-uri" data-settings="{{REMOTE_USER_DATA_URI}}">
|
||||
|
||||
<body class="vs-dark" aria-label="">
|
||||
</body>
|
||||
<!-- Workaround to pass remote connection token-->
|
||||
<meta id="vscode-remote-connection-token" data-settings="{{CONNECTION_AUTH_TOKEN}}">
|
||||
</head>
|
||||
|
||||
<!-- Require our AMD loader -->
|
||||
<script src="./out/vs/loader.js"></script>
|
||||
<body class="vs-dark" aria-label="">
|
||||
</body>
|
||||
|
||||
<!-- Startup via workbench.js -->
|
||||
<script src="./out/vs/code/browser/workbench/workbench.js"></script>
|
||||
<!-- Require our AMD loader -->
|
||||
<script src="./out/vs/loader.js"></script>
|
||||
|
||||
<!-- Startup via workbench.js -->
|
||||
<script src="./out/vs/code/browser/workbench/workbench.js"></script>
|
||||
</html>
|
||||
@@ -19,6 +19,8 @@
|
||||
});
|
||||
|
||||
require(['vs/workbench/workbench.web.api'], function (api) {
|
||||
api.create(document.body, JSON.parse(document.getElementById('vscode-workbench-web-configuration').getAttribute('data-settings')));
|
||||
const options = JSON.parse(document.getElementById('vscode-workbench-web-configuration').getAttribute('data-settings'));
|
||||
|
||||
api.create(document.body, options);
|
||||
});
|
||||
})();
|
||||
Reference in New Issue
Block a user