feat: Mettre à jour la configuration du backend et le formulaire de contact pour utiliser BASE_URL
This commit is contained in:
@@ -1,9 +1,12 @@
|
||||
{{ $form := .Page.Params.contactForm }}
|
||||
{{ $baseURL := default "http://localhost" (getenv "BASE_URL") }}
|
||||
{{ $normalizedBaseURL := strings.TrimSuffix "/" $baseURL }}
|
||||
{{ $defaultContactAction := printf "%s:3001/contact" $normalizedBaseURL }}
|
||||
|
||||
|
||||
|
||||
<form id="contactForm" class="max-w-lg mx-auto p-6 bg-white rounded shadow" method="POST"
|
||||
action="{{ $form.action | default "http://localhost:3001/contact" }}">
|
||||
action="{{ $form.action | default $defaultContactAction }}">
|
||||
<h3 class="text-2xl font-bold mb-4">{{ $form.title }}</h3>
|
||||
{{ range $form.fields }}
|
||||
<div class="mb-4">
|
||||
|
||||
Reference in New Issue
Block a user