mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 16:23:36 +00:00
Let baseDomain be configured for Cloudflare and Deno Deploy
This commit is contained in:
9 files changed
+64
-7
No files matched your search
@@ -27,6 +27,7 @@ interface CloudflareDeployFormProps {
|
||||
apiKey: string;
|
||||
accountId: string;
|
||||
baseURL?: string;
|
||||
baseDomain?: string;
|
||||
projectId: string;
|
||||
projectName?: string;
|
||||
savedProjectName?: string;
|
||||
@@ -38,6 +39,7 @@ export function CloudflareDeployForm({
|
||||
apiKey,
|
||||
accountId,
|
||||
baseURL = 'https://api.cloudflare.com/client/v4',
|
||||
baseDomain = 'workers.dev',
|
||||
projectId,
|
||||
projectName,
|
||||
savedProjectName,
|
||||
@@ -136,9 +138,9 @@ export function CloudflareDeployForm({
|
||||
// Construct the URL preview
|
||||
const getWorkerUrl = (scriptName: string) => {
|
||||
if (workersSubdomain) {
|
||||
return `https://${scriptName}.${workersSubdomain}.workers.dev`;
|
||||
return `https://${scriptName}.${workersSubdomain}.${baseDomain}`;
|
||||
}
|
||||
return `https://${scriptName}.<subdomain>.workers.dev`;
|
||||
return `https://${scriptName}.<subdomain>.${baseDomain}`;
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
@@ -25,6 +25,7 @@ interface DenoDeployFormProps {
|
||||
apiKey: string;
|
||||
organizationId: string;
|
||||
baseURL?: string;
|
||||
baseDomain?: string;
|
||||
projectId: string;
|
||||
projectName?: string;
|
||||
savedProjectName?: string;
|
||||
@@ -36,6 +37,7 @@ export function DenoDeployForm({
|
||||
apiKey,
|
||||
organizationId,
|
||||
baseURL = 'https://api.deno.com/v1',
|
||||
baseDomain = 'deno.dev',
|
||||
projectId,
|
||||
projectName,
|
||||
savedProjectName,
|
||||
@@ -117,7 +119,7 @@ export function DenoDeployForm({
|
||||
|
||||
// Construct the URL preview
|
||||
const getProjectUrl = (name: string) => {
|
||||
return `https://${name}.deno.dev`;
|
||||
return `https://${name}.${baseDomain}`;
|
||||
};
|
||||
|
||||
return (
|
||||
|
||||
Reference in new issue
Block a user