Skip to content

Commit 8940685

Browse files
authored
Revert "enable COI for desktop via coep: credentialless, change command line flag from "enable-coi" to "disable-coi" (microsoft#186720)" (microsoft#187047)
This reverts commit eafde5a.
1 parent 3b9f282 commit 8940685

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

src/vs/base/common/network.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -289,12 +289,10 @@ export const FileAccess = new FileAccessImpl();
289289

290290
export namespace COI {
291291

292-
const coepDefault = platform.isElectron ? 'credentialless' : 'require-corp';
293-
294292
const coiHeaders = new Map<'3' | '2' | '1' | string, Record<string, string>>([
295293
['1', { 'Cross-Origin-Opener-Policy': 'same-origin' }],
296-
['2', { 'Cross-Origin-Embedder-Policy': coepDefault }],
297-
['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': coepDefault }],
294+
['2', { 'Cross-Origin-Embedder-Policy': 'require-corp' }],
295+
['3', { 'Cross-Origin-Opener-Policy': 'same-origin', 'Cross-Origin-Embedder-Policy': 'require-corp' }],
298296
]);
299297

300298
export const CoopAndCoep = Object.freeze(coiHeaders.get('3'));

src/vs/platform/environment/common/argv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ export interface NativeParsedArgs {
111111
'profile-temp'?: boolean;
112112
'disable-chromium-sandbox'?: boolean;
113113

114-
'disable-coi'?: boolean;
114+
'enable-coi'?: boolean;
115115

116116
// chromium command line args: https://electronjs.org/docs/all#supported-chrome-command-line-switches
117117
'no-proxy-server'?: boolean;

src/vs/platform/environment/electron-main/environmentMainService.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ export class EnvironmentMainService extends NativeEnvironmentService implements
6363
get disableKeytar(): boolean { return !!this.args['disable-keytar']; }
6464

6565
@memoize
66-
get crossOriginIsolated(): boolean { return !this.args['disable-coi']; }
66+
get crossOriginIsolated(): boolean { return !!this.args['enable-coi']; }
6767

6868
@memoize
6969
get codeCachePath(): string | undefined { return process.env['VSCODE_CODE_CACHE_PATH'] || undefined; }

src/vs/platform/environment/node/argv.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ export const OPTIONS: OptionDescriptions<Required<NativeParsedArgs>> = {
164164
'continueOn': { type: 'string' },
165165
'locate-shell-integration-path': { type: 'string', args: ['bash', 'pwsh', 'zsh', 'fish'] },
166166

167-
'disable-coi': { type: 'boolean' },
167+
'enable-coi': { type: 'boolean' },
168168

169169
// chromium flags
170170
'no-proxy-server': { type: 'boolean' },

0 commit comments

Comments
 (0)