Skip to content
Merged
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
2 changes: 1 addition & 1 deletion AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ Existing Python files (listed in `ruff.toml` under `extend-exclude`) are grandfa

| Repo | Purpose |
|---|---|
| [NethServer/nethsecurity-api](https://github.com/NethServer/nethsecurity-api) | Go API server (ns-api-server); handles JWT auth, 2FA, proxies to ubus/rpcd |
| [NethServer/nethsecurity-api](https://github.com/NethServer/nethsecurity-api) | Go API server (ns-api-server); handles JWT auth, 2FA, proxies to ubus/rpcd. **Vendored in-tree**: source lives at `packages/ns-api-server/files/src/` and is built directly from there (`Build/Prepare` copies it, no upstream fetch) — edit it in this repo, then mirror the change upstream to keep the two in sync |
| [NethServer/python3-nethsec](https://github.com/NethServer/python3-nethsec) | Python utility library for APIs; used by all Python API scripts |
| [NethServer/nethsecurity-ui](https://github.com/NethServer/nethsecurity-ui) | Vue 3 + Tailwind CSS management UI (standalone + controller modes); built as `ns-ui` package |
| [NethServer/nethsecurity-monitoring](https://github.com/NethServer/nethsecurity-monitoring) | Go monitoring tools (ns-flows); reads netifyd flows, exposes REST API on localhost:8080 |
Expand Down
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.20.1
PKG_RELEASE:=5
PKG_RELEASE:=6

PKG_SOURCE:=nethsecurity-ui-$(PKG_VERSION).tar.gz
PKG_BUILD_DIR=$(BUILD_DIR)/nethsecurity-ui-$(PKG_VERSION)
Expand Down
22 changes: 22 additions & 0 deletions packages/ns-ui/files/00ns.locations
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,28 @@ location / {
try_files $uri $uri/ /index.html;
}

# body size limits on unauthenticated routes to prevent memory exhaustion
location = /api/login {
client_max_body_size 32k;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8090;
}

location = /api/logout {
client_max_body_size 1k;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8090;
}

location = /api/2fa/otp-verify {
client_max_body_size 32k;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_pass http://127.0.0.1:8090;
}

location /api/ {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $remote_addr;
Expand Down
22 changes: 22 additions & 0 deletions packages/ns-ui/files/ns-ui
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,28 @@ server {
try_files \$uri \$uri/ /index.html;
}

# body size limits on unauthenticated routes to prevent memory exhaustion
location = /api/login {
client_max_body_size 32k;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$remote_addr;
proxy_pass http://127.0.0.1:8090;
}

location = /api/logout {
client_max_body_size 1k;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$remote_addr;
proxy_pass http://127.0.0.1:8090;
}

location = /api/2fa/otp-verify {
client_max_body_size 32k;
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$remote_addr;
proxy_pass http://127.0.0.1:8090;
}

location /api/ {
proxy_set_header Host \$host;
proxy_set_header X-Forwarded-For \$remote_addr;
Expand Down
Loading