reverse proxy basics (#609)

This commit is contained in:
Saeed Vaziry
2025-06-10 00:14:05 +02:00
committed by GitHub
parent 4e6491a080
commit 09a9735962
7 changed files with 101 additions and 33 deletions

View File

@ -25,6 +25,7 @@ type CreateSiteForm = {
php_version: string;
source_control: string;
user: string;
port: string;
};
export default function CreateSite({ server, children }: { server?: Server; children: ReactNode }) {
@ -39,6 +40,7 @@ export default function CreateSite({ server, children }: { server?: Server; chil
php_version: '',
source_control: '',
user: '',
port: '',
});
const submit: FormEventHandler = (e) => {
@ -154,6 +156,15 @@ export default function CreateSite({ server, children }: { server?: Server; chil
<InputError message={form.errors.aliases} />
</FormField>
<FormField>
<Label htmlFor="port">Reverse proxy port</Label>
<Input id="port" type="text" value={form.data.port} onChange={(e) => form.setData('port', e.target.value)} placeholder="3000" />
<p className="text-muted-foreground text-xs">
This port will be used for reverse proxying the site. It should be unique across all sites on the server.
</p>
<InputError message={form.errors.port} />
</FormField>
{page.props.configs.site_types_custom_fields[form.data.type].map((config) => getFormField(config))}
<FormField>