feat(domains): add support for traefik.me domain notifications

- Implemented checks for traefik.me domains across AddDomain, AddPreviewDomain, and ShowPreviewSettings components.
- Added informational alerts to notify users that traefik.me is a public HTTP service and does not support SSL/HTTPS, ensuring clarity in domain configuration.
This commit is contained in:
Mauricio Siu
2025-12-10 00:17:18 -06:00
parent 8ab4ee8e0e
commit 22927c2716
3 changed files with 35 additions and 0 deletions
@@ -208,6 +208,8 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
const certificateType = form.watch("certificateType"); const certificateType = form.watch("certificateType");
const https = form.watch("https"); const https = form.watch("https");
const domainType = form.watch("domainType"); const domainType = form.watch("domainType");
const host = form.watch("host");
const isTraefikMeDomain = host?.includes("traefik.me") || false;
useEffect(() => { useEffect(() => {
if (data) { if (data) {
@@ -502,6 +504,13 @@ export const AddDomain = ({ id, type, domainId = "", children }: Props) => {
to make your traefik.me domain work. to make your traefik.me domain work.
</AlertBlock> </AlertBlock>
)} )}
{isTraefikMeDomain && (
<AlertBlock type="info">
<strong>Note:</strong> traefik.me is a public HTTP
service and does not support SSL/HTTPS. HTTPS and
certificate options will not have any effect.
</AlertBlock>
)}
<FormLabel>Host</FormLabel> <FormLabel>Host</FormLabel>
<div className="flex gap-2"> <div className="flex gap-2">
<FormControl> <FormControl>
@@ -86,6 +86,9 @@ export const AddPreviewDomain = ({
resolver: zodResolver(domain), resolver: zodResolver(domain),
}); });
const host = form.watch("host");
const isTraefikMeDomain = host?.includes("traefik.me") || false;
useEffect(() => { useEffect(() => {
if (data) { if (data) {
form.reset({ form.reset({
@@ -157,6 +160,13 @@ export const AddPreviewDomain = ({
name="host" name="host"
render={({ field }) => ( render={({ field }) => (
<FormItem> <FormItem>
{isTraefikMeDomain && (
<AlertBlock type="info">
<strong>Note:</strong> traefik.me is a public HTTP
service and does not support SSL/HTTPS. HTTPS and
certificate options will not have any effect.
</AlertBlock>
)}
<FormLabel>Host</FormLabel> <FormLabel>Host</FormLabel>
<div className="flex gap-2"> <div className="flex gap-2">
<FormControl> <FormControl>
@@ -245,6 +255,12 @@ export const AddPreviewDomain = ({
<FormDescription> <FormDescription>
Automatically provision SSL Certificate. Automatically provision SSL Certificate.
</FormDescription> </FormDescription>
{isTraefikMeDomain && (
<AlertBlock type="warning" className="mt-2">
HTTPS is not available for traefik.me domains as it
is a public HTTP-only service.
</AlertBlock>
)}
<FormMessage /> <FormMessage />
</div> </div>
<FormControl> <FormControl>
@@ -4,6 +4,7 @@ import { useEffect, useState } from "react";
import { useForm } from "react-hook-form"; import { useForm } from "react-hook-form";
import { toast } from "sonner"; import { toast } from "sonner";
import { z } from "zod"; import { z } from "zod";
import { AlertBlock } from "@/components/shared/alert-block";
import { Badge } from "@/components/ui/badge"; import { Badge } from "@/components/ui/badge";
import { Button } from "@/components/ui/button"; import { Button } from "@/components/ui/button";
import { import {
@@ -100,6 +101,8 @@ export const ShowPreviewSettings = ({ applicationId }: Props) => {
}); });
const previewHttps = form.watch("previewHttps"); const previewHttps = form.watch("previewHttps");
const wildcardDomain = form.watch("wildcardDomain");
const isTraefikMeDomain = wildcardDomain?.includes("traefik.me") || false;
useEffect(() => { useEffect(() => {
setIsEnabled(data?.isPreviewDeploymentsActive || false); setIsEnabled(data?.isPreviewDeploymentsActive || false);
@@ -168,6 +171,13 @@ export const ShowPreviewSettings = ({ applicationId }: Props) => {
</DialogDescription> </DialogDescription>
</DialogHeader> </DialogHeader>
<div className="grid gap-4"> <div className="grid gap-4">
{isTraefikMeDomain && (
<AlertBlock type="info">
<strong>Note:</strong> traefik.me is a public HTTP service and
does not support SSL/HTTPS. HTTPS and certificate options will
not have any effect.
</AlertBlock>
)}
<Form {...form}> <Form {...form}>
<form <form
onSubmit={form.handleSubmit(onSubmit)} onSubmit={form.handleSubmit(onSubmit)}