Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion packages/ns-api/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=ns-api
PKG_VERSION:=3.4.4
PKG_VERSION:=3.4.5
PKG_RELEASE:=1

PKG_BUILD_DIR:=$(BUILD_DIR)/ns-api-$(PKG_VERSION)
Expand Down Expand Up @@ -190,6 +190,7 @@ define Package/ns-api/install
$(INSTALL_BIN) ./files/uci-defaults/99-ns-api.synflood $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/uci-defaults/99-ns-api.dnsmasq $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/uci-defaults/99-ns-api.wireguard $(1)/etc/uci-defaults
$(INSTALL_BIN) ./files/uci-defaults/99-ns-api.nginx $(1)/etc/uci-defaults
$(INSTALL_DIR) $(1)/usr/libexec
$(INSTALL_BIN) ./files/misc/wireguard-migrate.py $(1)/usr/libexec/wireguard-migrate
endef
Expand Down
14 changes: 14 additions & 0 deletions packages/ns-api/files/uci-defaults/99-ns-api.nginx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/bin/sh

#
# Copyright (C) 2026 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-2.0-only
#

# Iterates over the configuration sections to disable server tokens
servers=$(uci show nginx | grep -Po '^nginx.([A-Za-z0-9_]+)=server$' | cut -d'.' -f2 | cut -d'=' -f1)
for server in $servers; do
if [ -z "$(uci -q get "nginx.${server}.server_tokens")" ]; then
uci set "nginx.$server.server_tokens=off"
fi
done
2 changes: 1 addition & 1 deletion packages/ns-ui/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=ns-ui
# renovate: datasource=github-releases depName=NethServer/nethsecurity-ui
PKG_VERSION:=2.8.1
PKG_RELEASE:=1
PKG_RELEASE:=2

PKG_SOURCE:=ui-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://nethsecurity.ams3.digitaloceanspaces.com/ui-dist/
Expand Down
6 changes: 6 additions & 0 deletions packages/ns-ui/files/ns-ui
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,12 @@ server {
ssl_session_timeout 64m;
error_log syslog:server=unix:/dev/log,nohostname;
access_log syslog:server=unix:/dev/log,nohostname;
server_tokens off;
add_header X-Content-Type-Options "nosniff";
add_header Permissions-Policy "()";
add_header Referrer-Policy "no-referrer";
add_header Content-Security-Policy "default-src 'self'";
add_header Cache-Control "max-age=1800";

# enable NS UI
location / {
Expand Down
2 changes: 1 addition & 1 deletion packages/python3-nethsec/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=python3-nethsec
# renovate: datasource=github-tags depName=NethServer/python3-nethsec
PKG_VERSION:=1.4.5
PKG_VERSION:=1.4.6
PKG_RELEASE:=1

PKG_MAINTAINER:=Giacomo Sanchietti <giacomo.sanchietti@nethesis.it>
Expand Down
Loading