# Domain Configuration - cross-all.defi-oracle.io

## Domain Assignment

**Domain**: `cross-all.defi-oracle.io`  
**Purpose**: Bridge DApp Frontend (Admin Panel, Mainnet Tether, Transaction Mirror, 2-Way Bridge)

## NPMplus Configuration

### Step 1: Create Proxy Host

1. Login to NPMplus dashboard
2. Click "Proxy Hosts" → "Add Proxy Host"
3. Configure as follows:

**Details Tab:**
- Domain Names: `cross-all.defi-oracle.io`
- Scheme: `http`
- Forward Hostname/IP: `[BRIDGE_VM_IP]` (e.g., `192.168.11.XX`)
- Forward Port: `80`
- Cache Assets: ✅ Enabled
- Block Common Exploits: ✅ Enabled
- Websockets Support: ✅ Enabled

**SSL Tab:**
- SSL Certificate: Request new SSL Certificate with Let's Encrypt
- Force SSL: ✅ Enabled
- HTTP/2 Support: ✅ Enabled
- HSTS Enabled: ✅ Enabled
- HSTS Subdomains: ✅ Enabled (if desired)

**Advanced Tab:**
- Add custom security headers:
  ```
  X-Frame-Options: SAMEORIGIN
  X-Content-Type-Options: nosniff
  X-XSS-Protection: 1; mode=block
  Referrer-Policy: strict-origin-when-cross-origin
  ```

### Step 2: Verify Configuration

After deployment:
- ✅ Access: `https://cross-all.defi-oracle.io/`
- ✅ Admin Panel: `https://cross-all.defi-oracle.io/admin`
- ✅ SSL certificate valid
- ✅ Security headers present

## DNS Configuration

Ensure DNS is configured to point `cross-all.defi-oracle.io` to your NPMplus server IP.

### DNS Record:
```
Type: A
Name: cross-all
Value: [NPMplus Server IP]
TTL: 300 (or auto)
```

## Deployment Path

1. Deploy bridge frontend to VM:
   ```bash
   ./deploy.sh 192.168.11.12 [BRIDGE_VMID]
   ```

2. Configure NPMplus proxy host (as above)

3. Test deployment:
   ```bash
   curl -I https://cross-all.defi-oracle.io/
   ```

## Security Headers

The nginx configuration includes:
- Content Security Policy (CSP)
- Strict Transport Security (HSTS)
- X-Frame-Options
- X-Content-Type-Options
- X-XSS-Protection
- Referrer-Policy

Additional headers can be added via NPMplus Advanced tab or nginx configuration.

## Access Points

- **Production**: `https://cross-all.defi-oracle.io/`
- **Admin Panel**: `https://cross-all.defi-oracle.io/admin`
- **Direct VM**: `http://[BRIDGE_VM_IP]/` (internal only)
- **Development**: `http://localhost:3002/`

---

**Last Updated**: 2025-01-22
