- setShortUrlData({ ...shortUrlData, validateUrl })}
- >
- Validate URL
-
- {showCrawlableControl && (
- setShortUrlData({ ...shortUrlData, crawlable })}
- >
- Make it crawlable
-
- )}
- {!isEdit && (
-
- setShortUrlData({ ...shortUrlData, findIfExists })}
+
+
+
+ setShortUrlData({ ...shortUrlData, validateUrl })}
>
- Use existing URL if found
-
-
-
+ Validate URL
+
+ {!isEdit && (
+
+ setShortUrlData({ ...shortUrlData, findIfExists })}
+ >
+ Use existing URL if found
+
+
+
+ )}
+
+
+ {showBehaviorCard && (
+
+
+ {showCrawlableControl && (
+ setShortUrlData({ ...shortUrlData, crawlable })}
+ >
+ Make it crawlable
+
+ )}
+ {showForwardQueryControl && (
+ setShortUrlData({ ...shortUrlData, forwardQuery })}
+ >
+ Forward query params on redirect
+
+ )}
+
+
)}
-
+
>
)}
diff --git a/src/short-urls/data/index.ts b/src/short-urls/data/index.ts
index c0fded8b..39e2ea39 100644
--- a/src/short-urls/data/index.ts
+++ b/src/short-urls/data/index.ts
@@ -9,6 +9,7 @@ export interface EditShortUrlData {
maxVisits?: number | null;
validateUrl?: boolean;
crawlable?: boolean;
+ forwardQuery?: boolean;
}
export interface ShortUrlData extends EditShortUrlData {
@@ -30,6 +31,7 @@ export interface ShortUrl {
domain: string | null;
title?: string | null;
crawlable?: boolean;
+ forwardQuery?: boolean;
}
export interface ShortUrlMeta {
diff --git a/src/utils/helpers/features.ts b/src/utils/helpers/features.ts
index 120926f8..d424e512 100644
--- a/src/utils/helpers/features.ts
+++ b/src/utils/helpers/features.ts
@@ -21,3 +21,5 @@ export const supportsCrawlableVisits = supportsBotVisits;
export const supportsQrErrorCorrection = serverMatchesVersions({ minVersion: '2.8.0' });
export const supportsDomainRedirects = supportsQrErrorCorrection;
+
+export const supportsForwardQuery = serverMatchesVersions({ minVersion: '2.9.0' });
diff --git a/test/settings/ShortUrlCreation.test.tsx b/test/settings/ShortUrlCreation.test.tsx
index 3a61f5dd..fda31fdb 100644
--- a/test/settings/ShortUrlCreation.test.tsx
+++ b/test/settings/ShortUrlCreation.test.tsx
@@ -29,20 +29,42 @@ describe('