coyotte508 HF staff commited on
Commit
3206bae
·
1 Parent(s): 0238f04

Update server.ts

Browse files
Files changed (1) hide show
  1. server.ts +1 -1
server.ts CHANGED
@@ -5,7 +5,7 @@ const app = new Koa();
5
  app.use((ctx) => {
6
  console.log(ctx.request.url, ctx.request.method);
7
  ctx.status = 307;
8
- ctx.headers.location = `http://localhost:24242${ctx.request.path}`;
9
  });
10
 
11
  app.listen(7860);
 
5
  app.use((ctx) => {
6
  console.log(ctx.request.url, ctx.request.method);
7
  ctx.status = 307;
8
+ ctx.set("location", `http://localhost:24242${ctx.request.path}`);
9
  });
10
 
11
  app.listen(7860);