Repository navigation
Expand file tree
/
Copy pathmultiDomain.ts
More file actions
75 lines (72 loc) · 2.68 KB
/
Copy pathmultiDomain.ts
File metadata and controls
75 lines (72 loc) · 2.68 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
import type { ClerkOptions } from './clerk';
/**
* You can configure proxy and satellite domains in a few ways:
*
* 1) none of them are set
* 2) only `proxyUrl` is set
* 3) `isSatellite` and `proxyUrl` are set
* 4) `isSatellite` and `domain` are set
*/
export type MultiDomainAndOrProxy =
| {
/**
* Indicates whether the application is a satellite application.
*/
isSatellite?: never;
/**
* **Required for applications that run behind a reverse proxy**. The URL that Clerk will proxy requests to. Can be either a relative path (`/__clerk`) or a full URL (`https://<your-domain>/__clerk`).
*/
proxyUrl?: never | string | ((url: URL) => string);
/**
* **Required if your application is a satellite application**. Sets the domain of the satellite application.
*/
domain?: never;
}
| {
isSatellite: Exclude<ClerkOptions['isSatellite'], undefined>;
proxyUrl?: never;
domain: string | ((url: URL) => string);
}
| {
isSatellite: Exclude<ClerkOptions['isSatellite'], undefined>;
proxyUrl: string | ((url: URL) => string);
domain?: never;
};
export type MultiDomainAndOrProxyPrimitives =
| {
/**
* Indicates whether the application is a satellite application.
*/
isSatellite?: never;
/**
* **Required for applications that run behind a reverse proxy**. The URL that Clerk will proxy requests to. Can be either a relative path (`/__clerk`) or a full URL (`https://<your-domain>/__clerk`).
*/
proxyUrl?: never | string;
/**
* **Required if your application is a satellite application**. Sets the domain of the satellite application.
*/
domain?: never;
}
| {
isSatellite: boolean;
proxyUrl?: never;
domain: string;
}
| {
isSatellite: boolean;
proxyUrl: string;
domain?: never;
};
/**
* If both `proxyUrl` and `domain` are set, the `proxyUrl` will be used.
*/
export type DomainOrProxyUrl = {
/**
* **Required for applications that run behind a reverse proxy**. The URL that Clerk will proxy requests to. Can be either a relative path (`/__clerk`) or a full URL (`https://<your-domain>/__clerk`), or a function that will be called with a `URL` made from `window.location.href`.
*/
proxyUrl?: string | ((url: URL) => string);
/**
* **Required if your application is a satellite application**. Sets the domain of the satellite application. Can be either a relative path (`/__clerk`) or a full URL (`https://<your-domain>/__clerk`), or a function that will be called with a `URL` made from `window.location.href`.
*/
domain?: string | ((url: URL) => string);
};