We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 40ff1fa commit e8136c6Copy full SHA for e8136c6
next-sitemap.config.mjs
@@ -2,6 +2,18 @@ import { env } from "node:process";
2
import { URL } from "node:url";
3
4
const SITE_URL = env.NEXT_PUBLIC_SITE_URL;
5
+const HP_ENV_NAME = env.HEADLESS_METADATA_ENV_NAME;
6
+
7
+const policy =
8
+ HP_ENV_NAME === "faust-prod"
9
+ ? {
10
+ userAgent: "*",
11
+ allow: "/",
12
+ }
13
+ : {
14
15
+ disallow: "/",
16
+ };
17
18
export default {
19
siteUrl: SITE_URL,
@@ -12,11 +24,6 @@ export default {
24
additionalSitemaps: [
25
new URL("/wp-sitemap.xml", SITE_URL), // <==== Add here
26
],
- policies: [
- {
- userAgent: "*",
- allow: "/",
- },
20
- ],
27
+ policies: [policy],
21
28
},
22
29
};
0 commit comments