fix: normalize relay ws path with trailing slash
**Motivations :** - ensure client hits nginx /ws/ location and receives handshake **Modifications :** - force bootstrap url sanitization to '/ws/' - update public documentation and service script metadata to reflect trailing slash requirement **Page affectées :** - src/services/service.ts - README.md - docs/INTEGRATION.md - start-dev.sh
This commit is contained in:
parent
b29f86af4e
commit
f0f8ed9768
@ -72,9 +72,9 @@ src/
|
||||
- **Communication**: WebSockets, PostMessage API
|
||||
|
||||
### **WebSocket Relay Configuration**
|
||||
- Default relay runs locally on `127.0.0.1:8091` and is exposed securely via `wss://relay235.4nkweb.com/ws`
|
||||
- Default relay runs locally on `127.0.0.1:8091` and is exposed securely via `wss://relay235.4nkweb.com/ws/`
|
||||
- Nginx TLS termination is defined in `nginx.relay235.conf` (kept alongside the existing `nginx.dev.conf`)
|
||||
- Clients must configure `VITE_BOOTSTRAPURL=wss://relay235.4nkweb.com/ws` to avoid mixed-content issues when the app is served over HTTPS
|
||||
- Clients must configure `VITE_BOOTSTRAPURL=wss://relay235.4nkweb.com/ws/` to avoid mixed-content issues when the app is served over HTTPS
|
||||
|
||||
## 🔧 Développement
|
||||
|
||||
|
||||
@ -109,9 +109,9 @@ Les styles s'adaptent automatiquement :
|
||||
```
|
||||
|
||||
### 1.1 Relai WebSocket
|
||||
- Relai principal exposé en `wss://relay235.4nkweb.com/ws`
|
||||
- Relai principal exposé en `wss://relay235.4nkweb.com/ws/`
|
||||
- Terminaison TLS gérée par `nginx.relay235.conf` (reverse proxy vers le service local sur `127.0.0.1:8091`)
|
||||
- Variables d’environnement cliente à utiliser : `VITE_BOOTSTRAPURL=wss://relay235.4nkweb.com/ws`
|
||||
- Variables d’environnement cliente à utiliser : `VITE_BOOTSTRAPURL=wss://relay235.4nkweb.com/ws/`
|
||||
|
||||
### 2. Intégration personnalisée
|
||||
```html
|
||||
|
||||
@ -65,9 +65,9 @@ function sanitizeBootstrapUrl(url: string): string {
|
||||
}
|
||||
|
||||
if (!parsed.pathname || parsed.pathname === '/') {
|
||||
parsed.pathname = '/ws';
|
||||
} else if (parsed.pathname.endsWith('/ws/')) {
|
||||
parsed.pathname = '/ws';
|
||||
parsed.pathname = '/ws/';
|
||||
} else if (parsed.pathname === '/ws') {
|
||||
parsed.pathname = '/ws/';
|
||||
}
|
||||
|
||||
parsed.search = '';
|
||||
|
||||
0
start-dev.sh
Normal file → Executable file
0
start-dev.sh
Normal file → Executable file
Loading…
x
Reference in New Issue
Block a user