Skip to content

Commit f5862a2

Browse files
authored
Update README with NGINX proxy and TLS details
Clarified NGINX proxy usage and added details on mandatory encrypted connections and basic authentication recommendations.
1 parent 94c8ec0 commit f5862a2

File tree

1 file changed

+44
-7
lines changed

1 file changed

+44
-7
lines changed

container/README.md

Lines changed: 44 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,12 @@ docker run -it \
111111
```
112112

113113
## NGINX Proxy
114-
The container also includes a nginx proxy running by default. This aggreggates the http and websockets ports into one port at 3000 (inside the container). It also makes it possible to further reverse proxy the application and add TLS encryption
114+
The container also includes a nginx proxy running by default. This aggreggates the http and websockets ports into one port at 3000 (inside the container). It also makes it possible to further reverse proxy the application and add TLS encryption.
115+
116+
**Encrypted connection is mandatory** if WLJS Notebook is hosted on a remote server, otherwise some features will not work due to the restrictions of the unsequred context such as:
117+
- Export to interactive HTML
118+
- Audio/Video input
119+
- Clipboard access
115120

116121
### TLS proxy config
117122

@@ -149,6 +154,44 @@ server {
149154

150155
Make sure to change port mapping from `80:3000` to `3000:3000` in the starting sequence if you start nginx TLS proxy outside the container
151156

157+
#### Note: if you do not have SSL certificate
158+
It is still worth to use HTTPS with invalid certificate since you can always bypass all checks in any web browser. Here is an example of NGINX configuration:
159+
160+
*/etc/nginx/sites-enabled/default*
161+
```
162+
server {
163+
listen 80;
164+
server_name <YourDomainName>;
165+
166+
return 301 https://$host$request_uri;
167+
}
168+
169+
server {
170+
listen 443 ssl;
171+
server_name <YourDomainName>;
172+
173+
ssl_certificate /etc/ssl/certs/ssl-cert-snakeoil.pem;
174+
ssl_certificate_key /etc/ssl/private/ssl-cert-snakeoil.key;
175+
176+
set $upstream http://127.0.0.1:3000;
177+
178+
location / {
179+
proxy_set_header Host $host;
180+
proxy_set_header X-Real-IP $remote_addr;
181+
proxy_set_header X-Forwarded-For $remote_addr;
182+
proxy_set_header Upgrade $http_upgrade;
183+
proxy_set_header Connection "keep-alive, upgrade";
184+
185+
proxy_pass $upstream;
186+
}
187+
}
188+
189+
```
190+
where files `/etc/ssl/certs/ssl-cert-snakeoil.pem` do not exist.
191+
192+
Make sure to change port mapping from `80:3000` to `3000:3000` in the starting sequence.
193+
194+
152195
### Basic Authentication
153196
*We do recommend to set this if you plan to access it from the public IP*
154197

@@ -208,9 +251,3 @@ docker run -it \
208251
ghcr.io/wljsteam/wolfram-js-frontend:main
209252
```
210253

211-
212-
213-
214-
## Known Issues
215-
216-
- Offline documentation is not available

0 commit comments

Comments
 (0)