-
Notifications
You must be signed in to change notification settings - Fork 0
/
routes.js
33 lines (32 loc) · 994 Bytes
/
routes.js
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
// This file was automatically added by edgio init.
// You should commit this file to source control.
import { Router } from '@edgio/core/router'
import { nuxtRoutes } from '@edgio/nuxt-nitro'
export default new Router()
.use(nuxtRoutes)
.match('/edgio-api/:path*', {
caching: { max_age: '86400s', stale_while_revalidate: '31536000s', bypass_client_cache: true },
url: {
url_rewrite: [
{
source: '/edgio-api/:path*',
syntax: 'path-to-regexp',
destination: '/:path*',
},
],
},
origin: { set_origin: 'api' },
})
.match('/edgio-opt', {
caching: { max_age: '86400s', stale_while_revalidate: '31536000s', bypass_client_cache: true },
url: {
url_rewrite: [
{
source: '/edgio-opt:optionalSlash(\\/?)?:optionalQuery(\\?.*)?',
syntax: 'path-to-regexp',
destination: '/:optionalSlash:optionalQuery',
},
],
},
origin: { set_origin: 'image' },
})