Skip to content

Commit

Permalink
docs:Modify some words (#811)
Browse files Browse the repository at this point in the history
  • Loading branch information
binsee authored and dead-horse committed Apr 25, 2017
1 parent 1132779 commit 394bf37
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion docs/source/zh-cn/basics/structure.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ egg-project
- `config/config.{env}.js` 用于编写配置文件,具体参见[配置](./config.md)
- `config/plugin.js` 用于配置需要加载的插件,具体参见[插件开发](../advanced/plugin.md)
- `test/**` 用于单元测试,具体参见[单元测试](../core/unittest.md)
- `app.js``agent.js` 用于自定义启动时的初始化工作,可选,具体参见[启动自定义](./app-start.md)
- `app.js``agent.js` 用于自定义启动时的初始化工作,可选,具体参见[启动自定义](./app-start.md)关于`agent.js`的作用参见[Agent机制](./core/cluster-and-ipc.md#agent-机制)

由内置插件约定的目录:

Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/core/cookie-and-session.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ exports.remove = function* (ctx) {

- overwrite(Boolean):设置 key 相同的键值对如何处理,如果设置为 true,则后设置的值会覆盖前面设置的,否则将会发送两个 set-cookie 响应头。
- sign(Boolean):设置是否对 Cookie 进行签名,如果设置为 true,则设置键值对的时候会同时对这个键值对的值进行签名,后面取的时候做校验,可以防止前端对这个值进行篡改。默认为 true。
- encrypt(Boolean):设置是否对 Cookie 进行加密,如果设置为 true,则在发送 Cookie 前会对这个键值对的值进行加密,客户端无法读取到 Cookie 的值。默认为 false。
- encrypt(Boolean):设置是否对 Cookie 进行加密,如果设置为 true,则在发送 Cookie 前会对这个键值对的值进行加密,客户端无法读取到 Cookie 的明文值。默认为 false。

在设置 Cookie 时我们需要思考清楚这个 Cookie 的作用,它需要被浏览器保存多久?是否可以被 js 获取到?是否可以被前端修改?

Expand Down
4 changes: 2 additions & 2 deletions docs/source/zh-cn/core/httpclient.md
Original file line number Diff line number Diff line change
Expand Up @@ -534,7 +534,7 @@ ctx.curl(url, {

### `beforeRequest: Function(options)`

HttpClient 在请求正在发送之前,会尝试调用 `beforeRequest` 钩子,允许我们在这里对请求参数做最后一次修改。
HttpClient 在请求正式发送之前,会尝试调用 `beforeRequest` 钩子,允许我们在这里对请求参数做最后一次修改。

```js
ctx.curl(url, {
Expand Down Expand Up @@ -663,7 +663,7 @@ $ http_proxy=http://127.0.0.1:8888 npm run dev

- 异常名称:`ResponseError, code: ECONNRESET`
- 出现场景:通常是服务端主动断开 socket 连接,导致 HTTP 请求链路异常。
- 排查建议:请确保当时服务端是否发生网络异常
- 排查建议:请检查当时服务端是否发生网络异常

### 服务不可达

Expand Down
2 changes: 1 addition & 1 deletion docs/source/zh-cn/core/security.md
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@ HTTP 是网络应用广泛使用的协议,负责 Web 内容的请求和获取

框架提供了 `hsts Strict-Transport-Security` 这个头的默认开启。让 HTTPS 站点不跳转到 HTTP,如果站点支持 HTTPS,请一定要开启。

如果我们的Webb 站点是 http 站点,需要关闭这个头。配置如下:
如果我们的Web 站点是 http 站点,需要关闭这个头。配置如下:

- maxAge 默认一年 `365 * 24 * 3600`
- includeSubdomains 默认 false, 可以添加子域名,保证所有子域名都使用 HTTPS 访问。
Expand Down

0 comments on commit 394bf37

Please sign in to comment.