Openstatus www.openstatus.dev

fix typo (#1576)

* fix typo

* ci: apply automated fixes

---------

Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>

authored by

Thibault Le Ouay
autofix-ci[bot]
and committed by
GitHub
4b7161e2 40ee67dc

+21 -9
+1 -1
apps/dashboard/src/components/forms/settings/form-workspace.tsx
··· 71 71 <FormCardHeader> 72 72 <FormCardTitle>Workspace</FormCardTitle> 73 73 <FormCardDescription> 74 - Manay your workspace name. 74 + Manage your workspace name. 75 75 </FormCardDescription> 76 76 </FormCardHeader> 77 77 <FormCardContent>
+20 -8
apps/status-page/src/middleware.ts
··· 77 77 if (_page.customDomain && host !== `${_page.slug}.stpg.dev`) { 78 78 const redirect = pathname.replace(`/${_page.customDomain}`, ""); 79 79 const url = new URL( 80 - `https://${_page.customDomain 80 + `https://${ 81 + _page.customDomain 81 82 }/protected?redirect=${encodeURIComponent(redirect)}`, 82 83 ); 83 84 console.log("redirect to /protected", url.toString()); ··· 85 86 } 86 87 87 88 const url = new URL( 88 - `${origin}${type === "pathname" ? `/${prefix}` : "" 89 + `${origin}${ 90 + type === "pathname" ? `/${prefix}` : "" 89 91 }/protected?redirect=${encodeURIComponent(pathname)}`, 90 92 ); 91 93 return NextResponse.redirect(url); ··· 102 104 103 105 return NextResponse.redirect( 104 106 new URL( 105 - `${req.nextUrl.origin}${redirect ?? type === "pathname" ? `/${prefix}` : "/" 107 + `${req.nextUrl.origin}${ 108 + redirect ?? type === "pathname" ? `/${prefix}` : "/" 106 109 }`, 107 110 ), 108 111 ); ··· 119 122 return NextResponse.rewrite(rewriteUrl); 120 123 } 121 124 122 - console.log({ customDomain: _page.customDomain, host, expectedHost: `${_page.slug}.stpg.dev` }) 125 + console.log({ 126 + customDomain: _page.customDomain, 127 + host, 128 + expectedHost: `${_page.slug}.stpg.dev`, 129 + }); 123 130 if (_page.customDomain && host !== `${_page.slug}.stpg.dev`) { 124 131 if (pathnames.length > 2 && !subdomain) { 125 132 const pathname = pathnames.slice(2).join("/"); ··· 149 156 console.log({ rewriteUrl }); 150 157 rewriteUrl.search = url.search; 151 158 return NextResponse.rewrite(rewriteUrl); 152 - 153 - 154 159 } 155 160 const rewriteUrl = new URL(`/${_page.slug}`, req.url); 156 161 console.log({ rewriteUrl }); 157 162 rewriteUrl.search = url.search; 158 163 return NextResponse.rewrite(rewriteUrl); 159 164 } 160 - if (host?.includes("openstatus.dev")){ 165 + if (host?.includes("openstatus.dev")) { 161 166 const rewriteUrl = new URL(`/${prefix}${url.pathname}`, req.url); 162 167 // Preserve search params from original request 163 168 rewriteUrl.search = url.search; ··· 189 194 } 190 195 191 196 // In case the host is a custom domain 192 - if (host && !(host?.includes("stpg.dev") || host?.includes("openstatus.dev") || host?.endsWith(".vercel.app"))) { 197 + if ( 198 + host && 199 + !( 200 + host?.includes("stpg.dev") || 201 + host?.includes("openstatus.dev") || 202 + host?.endsWith(".vercel.app") 203 + ) 204 + ) { 193 205 subdomain = host; 194 206 } 195 207 return subdomain;