xshell 1.3.34 → 1.3.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/server.d.ts CHANGED
@@ -108,7 +108,9 @@ export declare class Server {
108
108
  _router(ctx: Context, next: Next): Promise<void>;
109
109
  /** 被子类重写以自定义处理逻辑 */
110
110
  router(ctx: Context): Promise<boolean>;
111
- /** 重定向 ctx url (可以是完整 url 也可以是路径),设置 status code 为 code
111
+ /** 重定向 ctx 到完整 url 或者包含 querystring 的路径,设置 status code 为 code
112
+ - ctx
113
+ - url: 完整 url 或路径 (可以包含 querystring)
112
114
  - code: 301 (永久重定向) | 302 (临时重定向) | 307 (非 GET 请求保持原有方法和 body 的临时重定向) */
113
115
  redirect(ctx: Context, url: string, code: 301 | 302 | 307): true;
114
116
  logger(ctx: Context): void;
package/server.js CHANGED
@@ -368,7 +368,9 @@ export class Server {
368
368
  async router(ctx) {
369
369
  return false;
370
370
  }
371
- /** 重定向 ctx url (可以是完整 url 也可以是路径),设置 status code 为 code
371
+ /** 重定向 ctx 到完整 url 或者包含 querystring 的路径,设置 status code 为 code
372
+ - ctx
373
+ - url: 完整 url 或路径 (可以包含 querystring)
372
374
  - code: 301 (永久重定向) | 302 (临时重定向) | 307 (非 GET 请求保持原有方法和 body 的临时重定向) */
373
375
  redirect(ctx, url, code) {
374
376
  const { request: { _path } } = ctx;