File tree Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Expand file tree Collapse file tree 3 files changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,12 @@ import { PRODUCT_CONFIG } from '@utils/productConfig.mjs'
10
10
export async function GET ( req : Request ) {
11
11
const url = new URL ( req . url )
12
12
const productSlugs = url . searchParams . getAll ( 'products' )
13
+
14
+ const index = productSlugs . indexOf ( 'ptfe-releases' )
15
+ if ( index !== - 1 ) {
16
+ productSlugs [ index ] = 'terraform-enterprise'
17
+ }
18
+
13
19
const docsPaths = await getDocsPaths (
14
20
productSlugs . length === 0 ? Object . keys ( PRODUCT_CONFIG ) : productSlugs ,
15
21
)
Original file line number Diff line number Diff line change @@ -8,9 +8,13 @@ import { PRODUCT_CONFIG } from '@utils/productConfig.mjs'
8
8
9
9
export async function GET ( request : Request ) {
10
10
const url = new URL ( request . url )
11
- const product = url . searchParams . get ( 'product' )
11
+ let product = url . searchParams . get ( 'product' )
12
12
const fullPath = url . searchParams . get ( 'fullPath' )
13
13
14
+ if ( product === 'ptfe-releases' ) {
15
+ product = 'terraform-enterprise'
16
+ }
17
+
14
18
// If a `product` parameter has not been provided, return a 400
15
19
if ( ! product ) {
16
20
return new Response (
Original file line number Diff line number Diff line change @@ -23,5 +23,8 @@ export function middleware({ url }) {
23
23
}
24
24
25
25
export const config = {
26
- matcher : '/api/content/ptfe-releases/:path*' ,
26
+ matcher : [
27
+ '/api/content/ptfe-releases/:path*' ,
28
+ '/api/assets/ptfe-releases/:path*' ,
29
+ ] ,
27
30
}
You can’t perform that action at this time.
0 commit comments