https://github.com/flancer32/pwa-aid-mob
AI Demo PWA
https://github.com/flancer32/pwa-aid-mob
Last synced: about 1 year ago
JSON representation
AI Demo PWA
- Host: GitHub
- URL: https://github.com/flancer32/pwa-aid-mob
- Owner: flancer32
- License: apache-2.0
- Created: 2023-01-18T15:51:37.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-03-26T11:47:17.000Z (over 2 years ago)
- Last Synced: 2024-04-22T13:12:17.175Z (about 2 years ago)
- Language: JavaScript
- Size: 215 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# pwa-aid-mob
AI Demo PWA
## Configure Apache 2 to proxy Web Sockets
```shell
$ sudo a2enmod proxy
$ sudo a2enmod proxy_http
$ sudo a2enmod proxy_http2
$ sudo a2enmod proxy_wstunnel
$ sudo apache2ctl -M | grep proxy
proxy_module (shared)
proxy_http_module (shared)
proxy_http2_module (shared)
proxy_wstunnel_module (shared)
```
```apacheconf
...
# Redirect all requests to HTTP2 server.
RewriteEngine on
RewriteCond %{HTTP:Upgrade} !websocket [NC]
RewriteCond %{HTTP:Connection} !upgrade [NC]
RewriteRule "^/(.*)$" "http://localhost:8080/$1" [P]
RewriteCond %{HTTP:Upgrade} websocket [NC]
RewriteCond %{HTTP:Connection} upgrade [NC]
RewriteRule ^/?(.*) "ws://localhost:8080/$1" [P,L]
```