diff --git a/config/packages/framework.yaml b/config/packages/framework.yaml index 5a025bd4..72a69254 100644 --- a/config/packages/framework.yaml +++ b/config/packages/framework.yaml @@ -1,7 +1,9 @@ framework: secret: '%env(APP_SECRET)%' #csrf_protection: true - #http_method_override: true + http_method_override: false + trusted_proxies: '%env(TRUSTED_PROXIES)%' + trusted_headers: [ 'x-forwarded-for', 'x-forwarded-host', 'x-forwarded-proto', 'x-forwarded-port', 'x-forwarded-prefix' ] # Enables session support. Note that the session will ONLY be started if you read or write from it. # Remove or comment this section to explicitly disable session support. diff --git a/src/Service/WebHookService.php b/src/Service/WebHookService.php index a519e6c7..06666658 100644 --- a/src/Service/WebHookService.php +++ b/src/Service/WebHookService.php @@ -134,7 +134,7 @@ private function getPushEventFromGithub(Request $request): array if (is_object($payload) && isset($payload->repository)) { $cloneUrl = $payload->repository->clone_url; } - throw new GitBranchDeletedException('Webhook was triggered on a deleted branch for repository' . $cloneUrl . '.', 1564408696); + throw new GitBranchDeletedException(sprintf('Webhook was triggered on deleted branch %s for repository %s.', $payload->ref, $cloneUrl), 1564408696); } // Only for actual push events, not releases @@ -154,7 +154,7 @@ private function getPushEventFromGithub(Request $request): array } if (!$triggeringChange) { - throw new DocsNoRstChangesException('Branch has no RST changes.', 1570011098); + throw new DocsNoRstChangesException(sprintf('The commit %s pushed to %s:%s doesn\'t contain any changed .rst files', $payload->head_commit->id, $payload->repository->full_name, $payload->ref), 1570011098); } } diff --git a/templates/docs_deployments/index.html.twig b/templates/docs_deployments/index.html.twig index 5e91fb6f..00a558d3 100644 --- a/templates/docs_deployments/index.html.twig +++ b/templates/docs_deployments/index.html.twig @@ -235,6 +235,12 @@ {{ log.data.composerFile }} {% endif %} + {% if log.data.exceptionMessage is defined %} +
+ Reason + {{ log.data.exceptionMessage }} +
+ {% endif %} {% if log.data.exceptionCode is defined %}
Exception Code