fix: allow Gitea webhooks to reach PaC service

This commit is contained in:
Codex
2026-07-05 11:08:32 +00:00
parent 99f5b8bc5b
commit 09788a4c3c
2 changed files with 10 additions and 0 deletions
+2
View File
@@ -174,6 +174,8 @@ app:
path: /var/lib/gitea/gitea.db
actions:
enabled: true
webhook:
allowedHostList: private,loopback
registration:
disabled: true
storage:
+8
View File
@@ -101,6 +101,9 @@ interface GiteaConfig {
actions: {
enabled: boolean;
};
webhook: {
allowedHostList: string;
};
registration: {
disabled: boolean;
};
@@ -277,6 +280,7 @@ function readGiteaConfig(): GiteaConfig {
const server = y.objectField(app, "server", "app");
const database = y.objectField(app, "database", "app");
const actions = y.objectField(app, "actions", "app");
const webhook = y.objectField(app, "webhook", "app");
const registration = y.objectField(app, "registration", "app");
const storage = y.objectField(app, "storage", "app");
const dataStorage = y.objectField(storage, "data", "app.storage");
@@ -357,6 +361,9 @@ function readGiteaConfig(): GiteaConfig {
actions: {
enabled: y.booleanField(actions, "enabled", "app.actions"),
},
webhook: {
allowedHostList: y.stringField(webhook, "allowedHostList", "app.webhook"),
},
registration: {
disabled: y.booleanField(registration, "disabled", "app.registration"),
},
@@ -928,6 +935,7 @@ function envVars(gitea: GiteaConfig, target: GiteaTarget): string {
GITEA__database__PATH: app.database.path,
GITEA__repository__ROOT: `${app.storage.data.mountPath}/git/repositories`,
GITEA__actions__ENABLED: app.actions.enabled ? "true" : "false",
GITEA__webhook__ALLOWED_HOST_LIST: app.webhook.allowedHostList,
GITEA__service__DISABLE_REGISTRATION: app.registration.disabled ? "true" : "false",
GITEA__log__LEVEL: "Info",
UNIDESK_GITEA_TARGET: target.id,