Skip to content

Commit 48c2011

Browse files
committed
WP content query: add password as query string
1 parent d26dc06 commit 48c2011

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/components/about/utils.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,11 @@ import { WP_API_PAGES_ENDPOINT } from './config'
44
// Define a default query function that will receive the query key
55
export const defaultQueryFn = async <T extends unknown>(
66
key: number
7-
): Promise<T> => (await fetch(`${WP_API_PAGES_ENDPOINT}/${key}`)).json()
7+
): Promise<T> =>
8+
// `password` is part of a hack to attempt to exclude/filter NYC Map pages
9+
// from the ELA website's NextJS builds. It is not intended for security, so
10+
// it's safe to commit.
11+
(await fetch(`${WP_API_PAGES_ENDPOINT}/${key}?password=1234`)).json()
812

913
// Provide the default query function to your app with defaultConfig
1014
export const wpQueryCache = new QueryCache({

0 commit comments

Comments
 (0)