fix: Cross-subdomain redirect for shares with custom link
This commit is contained in:
@@ -96,10 +96,10 @@ export const renderShare = async (ctx: Context, next: Next) => {
|
||||
teamId: team?.id,
|
||||
});
|
||||
share = result.share;
|
||||
if (isUUID(shareId) && share && share.urlId) {
|
||||
if (isUUID(shareId) && share?.urlId) {
|
||||
// Redirect temporarily because the url slug
|
||||
// can be modified by the user at any time
|
||||
ctx.redirect(`/s/${share.urlId}`);
|
||||
ctx.redirect(share.canonicalUrl);
|
||||
ctx.status = 307;
|
||||
}
|
||||
document = result.document;
|
||||
|
||||
@@ -486,11 +486,11 @@
|
||||
"Share nested documents": "Share nested documents",
|
||||
"Nested documents are publicly available": "Nested documents are publicly available",
|
||||
"Nested documents are not shared": "Nested documents are not shared",
|
||||
"Custom link": "Custom link",
|
||||
"The document will be available at": "The document will be available at",
|
||||
"Automatically redirect to the editor": "Automatically redirect to the editor",
|
||||
"Users with edit permission will be redirected to the main app": "Users with edit permission will be redirected to the main app",
|
||||
"All users see the same publicly shared view": "All users see the same publicly shared view",
|
||||
"Custom link": "Custom link",
|
||||
"The document will be available at": "The document will be available at",
|
||||
"More options": "More options",
|
||||
"Close": "Close",
|
||||
"{{ teamName }} is using Outline to share documents, please login to continue.": "{{ teamName }} is using Outline to share documents, please login to continue.",
|
||||
|
||||
Reference in New Issue
Block a user