Skip to content

Commit

Permalink
chore: update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
terwer committed Nov 26, 2024
1 parent 8a22835 commit c9db35e
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/utils/widgetUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ const doOpenBrowserWindow = (
// newWindow.webContents.userAgent = `SiYuan/${app.getVersion()} https://b3log.org/siyuan Electron`
// newWindow.webContents.userAgent = MockBrowser.HEADERS.MACOS_CHROME["User-Agent"]

// !!! ⚠️警告,这里的拦截权限非常高,非西药不要设置, 过滤器的范围应该尽量小
// !!! ⚠️警告,这里的拦截权限非常高,非必要不要设置, 过滤器的范围应该尽量小
// 设置 session
const session = newWindow.webContents.session
session.webRequest.onBeforeSendHeaders({ urls: extraPreCfg.uaWhiteList }, (details: any, callback: any) => {
Expand All @@ -143,7 +143,7 @@ const doOpenBrowserWindow = (
details.requestHeaders["User-Agent"] = MockBrowser.HEADERS.MACOS_CHROME["User-Agent"]
callback({ cancel: false, requestHeaders: details.requestHeaders })
})
// !!! ⚠️警告,这里的拦截权限非常高,非西药不要设置, 过滤器的范围应该尽量小
// !!! ⚠️警告,这里的拦截权限非常高,非必要不要设置, 过滤器的范围应该尽量小

// 允许
remote.enable(newWindow.webContents)
Expand Down

0 comments on commit c9db35e

Please sign in to comment.