Skip to content

Commit 7ffa6fa

Browse files
committed
chore(shared): Warn about getRequestUrl deprecation
1 parent 08be471 commit 7ffa6fa

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

.changeset/eighty-swans-trade.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
'@clerk/shared': patch
3+
---
4+
5+
Apply deprecation warnings:
6+
- `OrganizationContext`
7+
- `organizationList`
8+
- `useOrganizations`
9+
- `getRequestUrl`

packages/shared/src/utils/proxy.ts

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
import { deprecated } from './deprecated';
2+
13
export function isValidProxyUrl(key: string | undefined) {
24
if (!key) {
35
return true;
@@ -25,6 +27,7 @@ export function proxyUrlToAbsoluteURL(url: string | undefined): string {
2527
* @deprecated Use `buildRequestUrl` from @clerk/backend
2628
*/
2729
export function getRequestUrl({ request, relativePath }: { request: Request; relativePath?: string }): URL {
30+
deprecated('getRequestUrl', 'Use `buildRequestUrl` from @clerk/backend instead.');
2831
const { headers, url: initialUrl } = request;
2932
const url = new URL(initialUrl);
3033
const host = headers.get('X-Forwarded-Host') ?? headers.get('host') ?? (headers as any)['host'] ?? url.host;

0 commit comments

Comments
 (0)