Avoid duplicating Studio base path in legacy design redirects
studio CI and deployment / verify-and-deploy (push) Successful in 4m29s
studio CI and deployment / verify-and-deploy (push) Successful in 4m29s
This commit is contained in:
@@ -6,5 +6,6 @@ export const getServerSideProps:GetServerSideProps=async({params,req,res})=>{
|
||||
res.setHeader('Cache-Control','private, no-store');
|
||||
const design=await readDesign(params?.id,req);
|
||||
if(!design)return {notFound:true};
|
||||
return {redirect:{destination:designUrl(design.layoutId,design.id),permanent:false}};
|
||||
// Next adds the configured /studio basePath to server redirects.
|
||||
return {redirect:{destination:designUrl(design.layoutId,design.id).slice('/studio'.length),permanent:false}};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user