如需查看完整的文档索引,请参阅 llms.txt。在文档页面的 URL 末尾加上 .md 即可查看该页面的 Markdown 版本。
主导航
主题

桌面应用的浏览器策略

为桌面应用的内置浏览器部署并验证受支持的 Chrome 策略

使用移动设备管理(MDM)配置 ChatGPT 桌面应用的内置浏览器。从支持的策略列表中选择策略,部署前先在 Chrome 企业版策略参考文档中查阅策略名称和值的格式。逐项确认策略支持的平台和浏览器版本。

如果您已经在管理 Chrome,这套部署流程应该很熟悉。Chrome 既支持按设备部署策略,也支持通过 Google 管理控制台在云端管理浏览器。ChatGPT 桌面应用目前支持通过 MDM、组策略或配置管理工具按设备部署策略,暂不支持在云端管理这些浏览器策略。

在同一操作系统上,策略内容和格式与 Chrome 相同。主要区别在于策略在设备上的部署位置:请使用 ChatGPT 桌面应用自己的注册表项、偏好设置域或策略目录,而非 Chrome 的对应位置。

各平台的策略位置

平台 策略格式 Chrome 中的位置 ChatGPT 桌面应用中的位置
Windows 注册表值和注册表项 SOFTWARE\Policies\Google\Chrome SOFTWARE\Policies\OpenAI\Codex
macOS 配置描述文件中的受管理偏好设置 com.google.Chrome com.openai.codex
Linux 强制策略目录中的 JSON 文件 /etc/opt/chrome/policies/managed/ /etc/opt/codex/policies/managed/

ChatGPT 桌面应用的标识符仍包含 Codex 或 codex。请严格按上表所示填写。

  • Windows: 要将策略应用于设备上的所有用户,请使用 HKEY_LOCAL_MACHINE;要应用于特定用户,请使用 HKEY_CURRENT_USER。值和列表均采用 Chrome 的 Windows 注册表格式。Chrome 的标准管理模板(ADMX)仅适用于 Chrome,请为 ChatGPT 桌面应用使用自定义注册表设置。
  • macOS: 将策略键及其属性列表值部署为 com.openai.codex 域下的受管理偏好设置。面向 Chrome 偏好设置域的描述文件不会应用于 ChatGPT 桌面应用。
  • Linux: 将 JSON 文件直接部署到 /etc/opt/codex/policies/managed/。如果策略支持设置可由用户更改的默认值,请使用 /etc/opt/codex/policies/recommended/ 部署此类默认值。

管理员指南

策略示例

以下示例配置两项策略:

策略 示例值 效果
PasswordManagerEnabled false 禁止保存新密码。已保存的密码会保留。
CookiesBlockedForUrls ["https://example.com"] 禁止 https://example.com 设置 Cookie。用户仍可访问该网站。

请将示例设置替换为您组织的实际设置。

Windows:Microsoft Intune 或组策略

如果使用 Microsoft Intune,请将以下内容保存为 PowerShell 脚本,并将其添加到平台脚本中。该脚本会写入适用于设备上所有用户的强制策略:

$ErrorActionPreference = 'Stop'
$policyRoot = 'HKLM:\SOFTWARE\Policies\OpenAI\Codex'
if (-not (Test-Path -LiteralPath $policyRoot)) {
  New-Item -Path $policyRoot -Force | Out-Null
}
New-ItemProperty -Path $policyRoot -Name PasswordManagerEnabled -PropertyType DWord -Value 0 -Force | Out-Null
$cookieKey = "$policyRoot\CookiesBlockedForUrls"
if (-not (Test-Path -LiteralPath $cookieKey)) {
  New-Item -Path $cookieKey -Force | Out-Null
}
New-ItemProperty -Path $cookieKey -Name '1' -PropertyType String -Value 'https://example.com' -Force | Out-Null

在 Microsoft Intune 的平台脚本设置中,将使用登录凭据运行此脚本设置为否,将在 64 位 PowerShell 主机中运行脚本设置为是,然后将脚本分配给试点组。脚本运行后,重启 ChatGPT 桌面应用并验证策略。

如果使用组策略,请按脚本所示的注册表项、值名称、类型和值创建注册表首选项,并将其应用于试点设备。

注册表值格式如下:

  • 布尔值: 使用 REG_DWORD,其中 0 表示假,1 表示真。
  • 字符串列表: 创建与策略同名的子项。将其中的 REG_SZ 值从 1 开始依次编号。更新列表时,删除不再适用的编号值。
  • 结构化策略: 请遵循策略参考文档中规定的 Windows 编码方式。例如,ExtensionSettings 将字典编码为 JSON 字符串,并将其存储在 REG_SZ 值中。

如需按用户部署策略,请使用 HKEY_CURRENT_USER 下的相同路径,并在目标用户的上下文中部署。以 SYSTEM 身份运行的脚本不会写入已登录用户的 HKEY_CURRENT_USER。对于支持推荐默认值的策略,请在 ChatGPT 桌面应用的注册表根项下使用名为 Recommended 的子项。

macOS 配置描述文件

创建配置描述文件,在 com.openai.codex 域中设置强制执行的受管理偏好设置。如果使用 Jamf Pro,请先将以下内容保存为 com.openai.codex.plist:

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
  <key>PasswordManagerEnabled</key>
  <false/>
  <key>CookiesBlockedForUrls</key>
  <array>
    <string>https://example.com</string>
  </array>
</dict>
</plist>
  • Jamf Pro:在计算机配置描述文件中使用应用程序与自定义设置有效负载,上传属性列表,并将偏好设置域设为 com.openai.codex。请参阅自定义设置说明。
  • Microsoft Intune: 在 macOS 的模板 → 首选项文件下创建配置文件,并将首选项域名设置为 com.openai.codex。为此配置文件准备首选项文件时,仅保存示例最外层 <dict> 内的键值对。省略 XML 声明、DOCTYPE、<plist> 标签和最外层的 <dict> 标签。完整保留嵌套的 <array> 元素。请参阅 Intune 首选项文件说明。
  • 其他 MDM 工具: 使用工具提供的受管理偏好设置自定义流程,或为该域部署等效的 .mobileconfig 描述文件。

将描述文件分配给试点设备并确认已安装。重启 ChatGPT 桌面应用并验证策略。请使用受管理偏好设置。通过 defaults write 写入普通用户偏好设置无法强制执行策略。

Linux 配置管理

与部署 Chrome 策略一样,可使用 Ansible、Puppet 或 Chef 等工具向设备分发 JSON 策略文件。

  1. 如有需要,创建 /etc/opt/codex/policies/managed/ 目录。
  2. 使用配置管理工具、软件包或设备管理代理,将 JSON 文件直接部署到该目录中。
  3. 将目录和文件的所有者设为 root,确保 ChatGPT 桌面应用的用户可以读取,且只有受信任的管理员可以写入。常用的目录权限为 0755,文件权限为 0644。
  4. 重启 ChatGPT 桌面应用并验证策略。

/etc/opt/codex/policies/managed/browser.json 示例:

{
  "PasswordManagerEnabled": false,
  "CookiesBlockedForUrls": ["https://example.com"]
}

根据每项策略的要求,使用 JSON 布尔值、数字、数组或对象。请将文件直接放在 managed/ 中,浏览器不会读取子目录中的文件。避免在多个文件中定义同一项策略。

验证策略

  1. 确认部署工具已在试点设备上写入注册表值、安装描述文件或分发 JSON 文件。
  2. 退出并重新打开 ChatGPT 桌面应用。打开应用内浏览器标签页,并在 ChatGPT 桌面应用内访问 chrome://policy。
  3. 选择重新加载政策。检查每项策略的值、来源、作用范围、级别和状态。对于上述强制策略示例,来源应为平台,级别应为强制,且不应有策略错误。
  4. 在该浏览器中测试实际行为是否符合预期。策略出现在此页面上,说明浏览器已读取该策略。要确认相关功能是否按预期运行,还需实际测试。

对于某些策略,即使已重新加载策略,也需要完全退出并重启应用。请在完成试点验证后再扩大部署范围。

如果某项策略未显示,请检查其名称拼写、部署位置、分配对象和读取权限。如果某项策略报错或被忽略,请检查值类型、策略支持的平台和级别,以及 chrome://policy 上报告的策略冲突。

如需更改或移除策略,请更新最初下发该策略的部署配置,并删除不再使用的注册表条目或文件中的键。如果使用了脚本,请先删除脚本写入的值,再取消分配脚本。重启 ChatGPT 桌面应用并再次验证。

支持的策略列表

ChatGPT 桌面应用的应用内浏览器支持以下 244 项策略。要了解各项策略的用途、可接受的值及支持平台的详细信息,请在 Google 的 Chrome 企业版策略列表中按策略名称查找。

A–C

  • AccessControlAllowMethodsInCORSPreflightSpecConformant
  • AIModeSettings
  • AllowDeletingBrowserHistory
  • AllowedDomainsForApps
  • AllowSystemNotifications
  • AllowWebAuthnWithBrokenTlsCerts
  • AlternateErrorPagesEnabled
  • AlwaysOpenPdfExternally
  • AudioCaptureAllowed
  • AudioCaptureAllowedUrls
  • AuthNegotiateDelegateAllowlist
  • AuthServerAllowlist
  • AutofillAddressEnabled
  • AutofillCreditCardEnabled
  • AutoFillEnabled
  • AutofillSettings
  • AutoLaunchProtocolsFromOrigins
  • AutomaticDownloadsAllowedForUrls
  • AutomaticDownloadsBlockedForUrls
  • AutomaticFullscreenAllowedForUrls
  • AutomaticFullscreenBlockedForUrls
  • AutoOpenAllowedForURLs
  • AutoOpenFileTypes
  • AutoplayAllowed
  • AutoplayAllowlist
  • AutoSelectCertificateForUrls
  • BlockExternalExtensions
  • BlockThirdPartyCookies
  • BoundSessionCredentialsEnabled
  • CACertificates
  • CACertificatesWithConstraints
  • CacheEncryptionEnabled
  • CADistrustedCertificates
  • CAHintCertificates
  • CAPlatformIntegrationEnabled
  • CloudAPAuthEnabled
  • ComponentUpdatesEnabled
  • CompressionDictionaryTransportEnabled
  • CookiesAllowedForUrls
  • CookiesBlockedForUrls
  • CORSNonWildcardRequestHeadersSupport
  • CpuPerformanceTierOverride

D–F

  • DataUrlInSvgUseEnabled
  • DataUrlInWebWorkerOpaqueOriginEnabled
  • DefaultAutomaticDownloadsSetting
  • DefaultIdleDetectionSetting
  • DefaultImagesSetting
  • DefaultJavaScriptJitSetting
  • DefaultJavaScriptOptimizerSetting
  • DefaultJavaScriptSetting
  • DefaultLocalFontsSetting
  • DefaultMediaStreamSetting
  • DefaultNotificationsSetting
  • DefaultPopupsSetting
  • DefaultPrinterSelection
  • DefaultSearchProviderAlternateURLs
  • DefaultSearchProviderContextMenuAccessAllowed
  • DefaultSearchProviderName
  • DefaultSearchProviderNewTabURL
  • DefaultSearchProviderSearchURLPostParams
  • DefaultSearchProviderSuggestURL
  • DefaultSearchProviderSuggestURLPostParams
  • DefaultSensorsSetting
  • DefaultSerialGuardSetting
  • DefaultWebBluetoothGuardSetting
  • DefaultWebHidGuardSetting
  • DefaultWebUsbGuardSetting
  • DefaultWindowManagementSetting
  • DefaultWindowPlacementSetting
  • Disable3DAPIs
  • DisabledSchemes
  • DisablePrintPreview
  • DNSInterceptionChecksEnabled
  • DownloadRestrictions
  • EditBookmarksEnabled
  • EnableMediaRouter
  • EnableOnlineRevocationChecks
  • EncryptedClientHelloEnabled
  • EnterpriseHardwarePlatformAPIEnabled
  • ExemptDomainFileTypePairsFromFileTypeDownloadWarnings
  • ExtensionAllowedTypes
  • ExtensionDeveloperModeSettings
  • ExtensionExtendedBackgroundLifetimeForPortConnectionsToUrls
  • ExtensionInstallAllowlist
  • ExtensionInstallBlocklist
  • ExtensionInstallForcelist
  • ExtensionInstallSources
  • ExtensionInstallTypeBlocklist
  • ExtensionSettings
  • ExtensionUnpublishedAvailability
  • ExternalProtocolDialogShowAlwaysOpenCheckbox
  • FileOrDirectoryPickerWithoutGestureAllowedForOrigins
  • ForceForegroundPriorityForUrls
  • ForceGoogleSafeSearch
  • ForceSafeSearch
  • ForceYouTubeRestrict
  • ForceYouTubeSafetyMode

G–L

  • GeolocationBlockedForUrls
  • HSTSPolicyBypassList
  • HttpAllowlist
  • HttpHeaderInjection
  • HttpsUpgradesEnabled
  • IdleDetectionAllowedForUrls
  • IdleDetectionBlockedForUrls
  • ImagesAllowedForUrls
  • ImagesBlockedForUrls
  • ImportHistory
  • ImportSavedPasswords
  • IsolateOrigins
  • JavaScriptAllowedForUrls
  • JavaScriptBlockedForUrls
  • JavascriptEnabled
  • JavaScriptJitAllowedForSites
  • JavaScriptJitBlockedForSites
  • JavaScriptOptimizerAllowedForSites
  • JavaScriptOptimizerBlockedForSites
  • LocalFontsAllowedForUrls
  • LocalFontsBlockedForUrls
  • LocalNetworkAccessAllowedForUrls
  • LocalNetworkAccessBlockedForUrls
  • LocalNetworkAccessIpAddressSpaceOverrides
  • LocalNetworkAccessRestrictionsTemporaryOptOut
  • LocalNetworkAllowedForUrls
  • LocalNetworkBlockedForUrls
  • LookalikeWarningAllowlistDomains
  • LoopbackNetworkAllowedForUrls
  • LoopbackNetworkBlockedForUrls

M–P

  • ManagedBookmarks
  • ManagedConfigurationPerOrigin
  • NativeHostsExecutablesLaunchDirectly
  • NativeMessagingAllowlist
  • NativeMessagingBlocklist
  • NativeMessagingUserLevelHosts
  • NetworkPredictionOptions
  • NotificationsAllowedForUrls
  • NotificationsBlockedForUrls
  • OopPrintDriversAllowed
  • OriginAgentClusterDefaultEnabled
  • PartitionedBlobUrlUsage
  • PasswordLeakDetectionEnabled
  • PasswordManagerBlocklist
  • PasswordManagerEnabled
  • PaymentMethodQueryEnabled
  • PdfAnnotationsEnabled
  • PdfLocalFileAccessAllowedForDomains
  • PdfUseSkiaRendererEnabled
  • PdfViewerOutOfProcessIframeEnabled
  • PolicyDictionaryMultipleSourceMergeList
  • PopupsAllowedForUrls
  • PopupsBlockedForUrls
  • PreferSlowCiphers
  • PreferSlowKexAlgorithms
  • PrefetchWithServiceWorkerEnabled
  • PrinterTypeDenyList
  • PrintHeaderFooter
  • PrintingAllowedBackgroundGraphicsModes
  • PrintingBackgroundGraphicsDefault
  • PrintingEnabled
  • PrintingLPACSandboxEnabled
  • PrintingPaperSizeDefault
  • PrintPdfAsImageAvailability
  • PrintPdfAsImageDefault
  • PrintPostScriptMode
  • PrintPreviewUseSystemDefaultPrinter
  • PrintRasterizationMode
  • PrintRasterizePdfDpi
  • PromptOnMultipleMatchingCertificates
  • ProxyBypassList
  • ProxyMode
  • ProxyPacUrl
  • ProxyServer
  • ProxyServerMode
  • ProxySettings

Q–S

  • QuicAllowed
  • ReduceAcceptLanguageEnabled
  • RegisteredProtocolHandlers
  • RelaunchFastIfOutdated
  • RelaunchNotification
  • RelaunchNotificationPeriod
  • RelaunchWindow
  • RemoteDebuggingAllowed
  • RequireOnlineRevocationChecksForLocalAnchors
  • RestrictYouTubeCookiesDeletion
  • SameOriginTabCaptureAllowedByOrigins
  • SandboxExternalProtocolBlocked
  • ScreenCaptureAllowed
  • ScreenCaptureAllowedByOrigins
  • ScreenCaptureWithoutGestureAllowedForOrigins
  • ScrollToTextFragmentEnabled
  • SearchSuggestEnabled
  • SecurityKeyPermitAttestation
  • SensorsAllowedForUrls
  • SensorsBlockedForUrls
  • SerialAllowAllPortsForUrls
  • SerialAllowUsbDevicesForUrls
  • SerialAskForUrls
  • SerialBlockedForUrls
  • ServiceWorkerAutoPreloadEnabled
  • ServiceWorkerToControlSrcdocIframeEnabled
  • SharedArrayBufferUnrestrictedAccessAllowed
  • SharedWorkerBlobURLFixEnabled
  • SharedWorkerExtendedLifetimeEnabled
  • SignedHTTPExchangeEnabled
  • SilentPrintingEnabled
  • SitePerProcess
  • SpellcheckEnabled
  • SpellcheckLanguage
  • SpellcheckLanguageBlocklist
  • SSLErrorOverrideAllowed
  • SSLErrorOverrideAllowedForOrigins
  • StandardizedBrowserZoomEnabled
  • StaticStorageQuotaEnabled
  • StrictMimetypeCheckForWorkerScriptsEnabled
  • SuppressDifferentOriginSubframeDialogs

T–Z

  • TabCaptureAllowedByOrigins
  • TranslatorAPIAllowed
  • URLAllowlist
  • URLBlocklist
  • UrlKeyedAnonymizedDataCollectionEnabled
  • VideoCaptureAllowed
  • VideoCaptureAllowedUrls
  • WebAudioOutputBufferingEnabled
  • WebHidAllowAllDevicesForUrls
  • WebHidAllowDevicesForUrls
  • WebHidAllowDevicesWithHidUsagesForUrls
  • WebHidAskForUrls
  • WebHidBlockedForUrls
  • WebRtcDiagnosticLogCollectionAllowedForOrigins
  • WebRtcIPHandling
  • WebRtcIPHandlingUrl
  • WebRtcLocalIpsAllowedUrls
  • WebRtcPostQuantumKeyAgreement
  • WebRtcTextLogCollectionAllowed
  • WebRtcUdpPortRange
  • WebUsbAllowDevicesForUrls
  • WebUsbAskForUrls
  • WebUsbBlockedForUrls
  • WindowCaptureAllowedByOrigins
  • WindowManagementAllowedForUrls
  • WindowManagementBlockedForUrls
  • WindowPlacementAllowedForUrls
  • WindowPlacementBlockedForUrls
  • WPADQuickCheckEnabled
  • XSLTEnabled