Skip to content

Commit e78fa7c

Browse files
authored
Ensure compatibility with Debian 13 (#57)
2 parents 293a916 + ee8b6f7 commit e78fa7c

3 files changed

Lines changed: 20 additions & 0 deletions

File tree

CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
All changes that impact users of this module are documented in this file, in the [Common Changelog](https://common-changelog.org) format with some additional specifications defined in the CONTRIBUTING file. This codebase adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
44

5+
## Unreleased [patch]
6+
7+
> Development of this release was supported by the [French Ministry for Foreign Affairs](https://www.diplomatie.gouv.fr/fr/politique-etrangere-de-la-france/diplomatie-numerique/) through its ministerial [State Startups incubator](https://beta.gouv.fr/startups/open-terms-archive.html) under the aegis of the Ambassador for Digital Affairs.
8+
9+
### Fixed
10+
11+
- Ensure compatibility with Debian 13
12+
513
## 2.1.0 - 2025-06-10
614

715
_Full changeset and discussions: [#56](https://github.com/OpenTermsArchive/deployment/pull/56)._

playbooks/templates/nginx.conf.j2

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@
66
# vulnerabilities or exploits that are present in specific versions.
77
# Disabling server_tokens can help to mitigate this risk by removing the NGINX
88
# version number from the response headers.
9+
{% if not nginx_conf_has_server_tokens | default(false) %}
910
server_tokens off;
11+
{% endif %}
1012

1113
# Configure the rate limiting module to prevent DDoS attacks.
1214
limit_req_zone $binary_remote_addr zone=limited:10m rate=10r/s;

roles/nginx/configure/tasks/main.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,16 @@
77
state: absent
88
path: /etc/nginx/sites-enabled/default
99

10+
- name: Check if server_tokens is already configured
11+
ansible.builtin.command: grep -E "^\s*server_tokens" /etc/nginx/nginx.conf
12+
register: nginx_server_tokens_directive
13+
failed_when: false
14+
changed_when: false
15+
16+
- name: Share server_tokens configuration state
17+
ansible.builtin.set_fact:
18+
nginx_conf_has_server_tokens: "{{ nginx_server_tokens_directive.rc == 0 }}"
19+
1020
- name: Setup NGINX conf
1121
ansible.builtin.template:
1222
src: "{{ ota_nginx_config_template }}"

0 commit comments

Comments
 (0)