fix(tls): default OCSP stapling to off for new inbound certs

Certs without an OCSP responder URL (e.g. Let's Encrypt, which dropped OCSP in 2025) made xray log 'ignoring invalid OCSP: no OCSP server specified in cert' on every refresh. Default the per-cert ocspStapling interval to 0 (disabled) so new inbounds stay quiet; the field is kept for certs that do support stapling.
This commit is contained in:
MHSanaei committed 2026-06-21 19:15:57 +02:00 Unverified
1 parent 3aa76ea05b
commit 39774a6a38
5 files changed
+10 -10

No files matched your search

@@ -7,7 +7,7 @@ function defaultCertificate(): Record<string, unknown> {
keyFile: '',
certificate: [],
key: [],
ocspStapling: 3600,
ocspStapling: 0,
oneTimeLoading: false,
usage: 'encipherment',
buildChain: false,
@@ -132,7 +132,7 @@ export default function TlsForm({
keyFile: '',
certificate: [],
key: [],
ocspStapling: 3600,
ocspStapling: 0,
oneTimeLoading: false,
usage: 'encipherment',
buildChain: false,
@@ -39,7 +39,7 @@ export type TlsCertUsage = z.infer<typeof TlsCertUsageSchema>;
export const TlsCertFileSchema = z.object({
certificateFile: z.string().min(1),
keyFile: z.string().min(1),
ocspStapling: z.number().default(3600),
ocspStapling: z.number().default(0),
oneTimeLoading: z.boolean().default(false),
usage: TlsCertUsageSchema.default('encipherment'),
buildChain: z.boolean().default(false),
@@ -47,7 +47,7 @@ export const TlsCertFileSchema = z.object({
export const TlsCertInlineSchema = z.object({
certificate: z.array(z.string()),
key: z.array(z.string()),
ocspStapling: z.number().default(3600),
ocspStapling: z.number().default(0),
oneTimeLoading: z.boolean().default(false),
usage: TlsCertUsageSchema.default('encipherment'),
buildChain: z.boolean().default(false),
Loaded 3 of 5 files, more files were not shown because too many files have changed in this diff. Show more