- Treat an article that has become a father (nIstVater=1) as a free position (kArtikel=0) with the name kept: VersandIntern.vBestellPosOffen joins tArtikel with nIstVater=0, so such positions could never be reserved and failed with "insufficient stock after POS shortage booking" (e.g. Becks 42000030). - Recalculate tAuftragPositionEckdaten before deliverOrder so orders without payments get their positions reserved too (previously only insertPayment triggered the recalculation). Also adds debug logging across the delivery pipeline (reserve, commit, deliver, session, stock-shortage, create-order).
52 lines
1.6 KiB
Plaintext
52 lines
1.6 KiB
Plaintext
# nginx example: terminate TLS in nginx and proxy to the JTL POS plain-HTTP listener.
|
|
#
|
|
# The Node server listens on:
|
|
# PORT -> HTTPS (e.g. 4447)
|
|
# HTTP_PORT -> plain HTTP (e.g. 8087)
|
|
#
|
|
# With this setup you only need to expose port 443 (or 4443) through nginx.
|
|
# Copy this file to your nginx site config and adjust paths/ports as needed.
|
|
|
|
server {
|
|
listen 443 ssl;
|
|
listen [::]:443 ssl;
|
|
server_name pos.example.com;
|
|
|
|
# Same certificate pair the Node server uses (certs/key.pem + certs/cert.pem).
|
|
# For a real deployment, replace with your own cert/chain.
|
|
ssl_certificate /home/strainz/src/jtlPosSync/certs/cert.pem;
|
|
ssl_certificate_key /home/strainz/src/jtlPosSync/certs/key.pem;
|
|
|
|
ssl_protocols TLSv1.2 TLSv1.3;
|
|
ssl_ciphers HIGH:!aNULL:!MD5;
|
|
|
|
# The JTL POS API can send large request bodies (product/category sync).
|
|
client_max_body_size 0;
|
|
|
|
location / {
|
|
proxy_pass http://127.0.0.1:8087;
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Host $host;
|
|
proxy_set_header X-Real-IP $remote_addr;
|
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
|
proxy_set_header X-Forwarded-Proto $scheme;
|
|
|
|
# Keep alive to the Node backend.
|
|
proxy_set_header Connection "";
|
|
|
|
# Longer timeouts for long-running sync requests.
|
|
proxy_connect_timeout 60s;
|
|
proxy_read_timeout 300s;
|
|
proxy_send_timeout 300s;
|
|
}
|
|
}
|
|
|
|
# Optional: redirect all plain-HTTP traffic to HTTPS.
|
|
server {
|
|
listen 80;
|
|
listen [::]:80;
|
|
server_name pos.example.com;
|
|
return 301 https://$host$request_uri;
|
|
}
|