-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathroutes.ts
62 lines (61 loc) · 1.52 KB
/
routes.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// This file was automatically added by edgio init.
// You should commit this file to source control.
import { Router } from "@edgio/core/router";
import { nextRoutes } from "@edgio/next";
export default new Router()
// NextRoutes automatically adds routes for all Next.js pages and their assets
.use(nextRoutes)
// .always({
// caching: {
// cache_key: {
// include_headers: ["Content-Type"],
// },
// max_age: "86400s",
// stale_while_revalidate: "31536000s",
// ignore_origin_no_cache: [200],
// },
// })
.match("/api/result", {
caching: {
max_age: "86400s",
stale_while_revalidate: "31536000s",
ignore_origin_no_cache: [200],
},
})
.match("/api/search", {
caching: {
max_age: "86400s",
stale_while_revalidate: "31536000s",
ignore_origin_no_cache: [200],
},
})
.match("/docs/usage", {
caching: {
cache_key: {
include_headers: ["Content-Type"],
},
max_age: "86400s",
stale_while_revalidate: "31536000s",
ignore_origin_no_cache: [200],
},
})
.match("/result", {
caching: {
cache_key: {
include_headers: ["Content-Type"],
},
max_age: "86400s",
stale_while_revalidate: "31536000s",
ignore_origin_no_cache: [200],
},
})
.match("/home", {
caching: {
cache_key: {
include_headers: ["Content-Type"],
},
max_age: "86400s",
stale_while_revalidate: "31536000s",
ignore_origin_no_cache: [200],
},
});