@@ -25,6 +25,18 @@ Make sure to update the hash. To do so:
25
25
2. open any webview (i.e. preview Markdown)
26
26
3. see error in console and copy hash
27
27
28
+ That will test the hash change in pre/index.html
29
+
30
+ Double-check the console to make sure there are no console errors for the webWorkerExtensionHostIframe
31
+ which also requires a hash change.
32
+
33
+ parentOriginHash changes
34
+
35
+ This fixes webviews from not working properly due to a change upstream.
36
+ Upstream added a check to ensure parent authority is encoded into the webview
37
+ origin. Since our webview origin is the parent authority, we can bypass this
38
+ check.
39
+
28
40
Index: code-server/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
29
41
===================================================================
30
42
--- code-server.orig/lib/vscode/src/vs/workbench/services/environment/browser/environmentService.ts
@@ -54,6 +66,15 @@ Index: code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index
54
66
===================================================================
55
67
--- code-server.orig/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
56
68
+++ code-server/lib/vscode/src/vs/workbench/contrib/webview/browser/pre/index.html
69
+ @@ -5,7 +5,7 @@
70
+ <meta charset="UTF-8">
71
+
72
+ <meta http-equiv="Content-Security-Policy"
73
+ - content="default-src 'none'; script-src 'sha256-wwaDxsm1+SKIUb5YJXiZlYMyV7QPB8+zd6HPcTjigZs=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
74
+ + content="default-src 'none'; script-src 'sha256-IZkGO4jZeUn7pzM6pBZCZc9bUYm8oVNV3z8zEa8gxlk=' 'self'; frame-src 'self'; style-src 'unsafe-inline';">
75
+
76
+ <!-- Disable pinch zooming -->
77
+ <meta name="viewport"
57
78
@@ -331,6 +331,12 @@
58
79
59
80
const hostname = location.hostname;
@@ -93,7 +114,7 @@ Index: code-server/lib/vscode/src/vs/workbench/services/extensions/worker/webWor
93
114
default-src 'none';
94
115
child-src 'self' data: blob:;
95
116
- script-src 'self' 'unsafe-eval' 'sha256-/r7rqQ+yrxt57sxLuQ6AMYcy/lUpvAIzHjIJt/OeLWU=' https:;
96
- + script-src 'self' 'unsafe-eval' 'sha256-wwaDxsm1+SKIUb5YJXiZlYMyV7QPB8+zd6HPcTjigZs =' https:;
117
+ + script-src 'self' 'unsafe-eval' 'sha256-TkIM/TmudlFEe0ZRp0ptvN54LClwk30Rql4ZPE0hm/I =' https:;
97
118
connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*;"/>
98
119
</head>
99
120
<body>
0 commit comments