Openstatus www.openstatus.dev

fix: format (#1405)

authored by

Maximilian Kaske and committed by
GitHub
b2321194 aceb1107

+9 -10
+6 -4
apps/status-page/src/middleware.ts
··· 84 84 return NextResponse.rewrite(new URL(`/${prefix}${url.pathname}`, req.url)); 85 85 } 86 86 87 - if(_page.customDomain && host !== `${_page.slug}.stpg.dev` ){ 88 - if(pathnames.length > 2){ 87 + if (_page.customDomain && host !== `${_page.slug}.stpg.dev`) { 88 + if (pathnames.length > 2) { 89 89 const pathname = pathnames.slice(2).join("/"); 90 - return NextResponse.rewrite(new URL(`/${_page.slug}/${pathname}`, req.url)); 90 + return NextResponse.rewrite( 91 + new URL(`/${_page.slug}/${pathname}`, req.url), 92 + ); 91 93 } 92 - return NextResponse.rewrite(new URL(`/${_page.slug}`, req.url)); 94 + return NextResponse.rewrite(new URL(`/${_page.slug}`, req.url)); 93 95 } 94 96 95 97 return response;
+3 -6
apps/web/next.config.js
··· 101 101 { type: "cookie", key: "sp_mode", value: "new" }, 102 102 { 103 103 type: "host", 104 - value: 105 - "^(?!.*\\.openstatus\\.dev$)(?!openstatus\\.dev$)$", 104 + value: "^(?!.*\\.openstatus\\.dev$)(?!openstatus\\.dev$)$", 106 105 }, 107 106 ], 108 107 destination: "https://www.stpg.dev/:path*", ··· 114 113 { type: "cookie", key: "sp_mode", value: "new" }, 115 114 { 116 115 type: "host", 117 - value: 118 - "^(?<domain>.+)$", 116 + value: "^(?<domain>.+)$", 119 117 }, 120 118 ], 121 119 destination: "https://www.stpg.dev/:domain*", ··· 127 125 { type: "cookie", key: "sp_mode", value: "new" }, 128 126 { 129 127 type: "host", 130 - value: 131 - "^(?<domain>.+)$", 128 + value: "^(?<domain>.+)$", 132 129 }, 133 130 ], 134 131 destination: "https://www.stpg.dev/:domain/:path*",