Skip to content

Commit

Permalink
docs: update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zhouxianfu committed Oct 27, 2022
1 parent f93c38a commit 146174f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ if (process.env.NODE_ENV === 'development') {
## Reminder

1. `mockServiceWorker.js` 文件只能放在静态文件目录中(`/public`),作为 `Service Worker` 服务的注册文件,不参与打包编译,只能以 **相对路径** 的形式引用,不然 `Service Worker` 服务无法注册,会导致请求拦截不生效。
2. `service Worker` API 使用限制:只能在 **https(已安转证书)、localhost、127.0.0.1** 等服务下使用,否则控制台会出现 `[MSW] Mocking enabled (fallback mode)` 日志,也就是说 **http** 域名服务,包括本地 **IP** 服务,例如:`http://10.168.44.123:3000/` 等服务下不可用。
2. 由于浏览器 `service Worker` API 使用限制:只能在 **https(已安转证书)、localhost、127.0.0.1** 等服务下使用,否则控制台会出现 `[MSW] Mocking enabled (fallback mode)` 日志,也就是说 **http** 域名服务,包括本地 **IP** 服务,例如:`http://10.168.44.123:3000/` 等服务下不可用。

## TODO

Expand Down

0 comments on commit 146174f

Please sign in to comment.