mirror of
https://github.com/Such-Software/wownerogue.git
synced 2026-10-18 06:41:27 +02:00
fix payment addy bug
This commit is contained in:
@@ -392,14 +392,35 @@ The systemd hardening options:
|
||||
- `PrivateTmp=yes` - isolates /tmp
|
||||
- `ReadWritePaths` - whitelists writable directories
|
||||
|
||||
### Reverse Proxy
|
||||
### Reverse Proxy (Nginx Proxy Manager)
|
||||
|
||||
Use your existing reverse proxy (Nginx Proxy Manager, Caddy, Traefik, etc.) to forward traffic to port 3000. Key settings for WebSocket support:
|
||||
If using Nginx Proxy Manager:
|
||||
|
||||
- Enable WebSocket proxying
|
||||
- Set timeout to at least 86400s for long-lived connections
|
||||
- Forward `/socket.io/` path to the backend
|
||||
- Optionally protect `/admin.html` with authentication
|
||||
1. **Add Proxy Host**
|
||||
- Domain Names: `yourdomain.com`
|
||||
- Scheme: `http`
|
||||
- Forward Hostname/IP: Your server's LAN IP (e.g., `192.168.1.100`)
|
||||
- Forward Port: `3000`
|
||||
- Enable "Websockets Support" toggle
|
||||
|
||||
2. **SSL Tab**
|
||||
- Request a new SSL certificate
|
||||
- Enable "Force SSL"
|
||||
|
||||
3. **Advanced Tab** - Paste this config for WebSocket support:
|
||||
|
||||
```nginx
|
||||
location /socket.io/ {
|
||||
proxy_pass http://192.168.1.100:3000;
|
||||
proxy_http_version 1.1;
|
||||
proxy_set_header Upgrade $http_upgrade;
|
||||
proxy_set_header Connection "upgrade";
|
||||
proxy_set_header Host $host;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
proxy_read_timeout 86400s;
|
||||
proxy_send_timeout 86400s;
|
||||
}
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
|
||||
@@ -333,6 +333,17 @@ class GameModeManager {
|
||||
return result.rows[0] || null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Convert package info to JSON-safe format (BigInt price -> Number)
|
||||
*/
|
||||
_serializePackageInfo(packageInfo) {
|
||||
if (!packageInfo) return null;
|
||||
return {
|
||||
...packageInfo,
|
||||
price: typeof packageInfo.price === 'bigint' ? Number(packageInfo.price) : packageInfo.price
|
||||
};
|
||||
}
|
||||
|
||||
_mapPaymentRowToRequest(row, paymentType, packageInfo) {
|
||||
if (!row) return null;
|
||||
const amount = Number(row.expected_amount);
|
||||
@@ -345,7 +356,7 @@ class GameModeManager {
|
||||
expiresAt: row.expires_at,
|
||||
paymentType,
|
||||
description: row.description,
|
||||
package: packageInfo || null,
|
||||
package: this._serializePackageInfo(packageInfo),
|
||||
reused: true
|
||||
};
|
||||
}
|
||||
@@ -876,7 +887,7 @@ class GameModeManager {
|
||||
amountFormatted: this.formatAtomicHuman(amount, 4),
|
||||
currency: this.cryptoType,
|
||||
expiresAt: insertedRow?.expires_at || expiresAt,
|
||||
package: packageInfo,
|
||||
package: this._serializePackageInfo(packageInfo),
|
||||
paymentType,
|
||||
description,
|
||||
reused: false
|
||||
|
||||
Reference in New Issue
Block a user