Skip to content

Commit 2c4e569

Browse files
core: tools: nginx: Add zenoh and zeno-api redirects
Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
1 parent 3e6efde commit 2c4e569

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed

core/tools/nginx/nginx.conf

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -199,6 +199,36 @@ http {
199199
proxy_pass http://127.0.0.1:9110/;
200200
}
201201

202+
location /zenoh/ {
203+
proxy_hide_header Access-Control-Allow-Origin;
204+
205+
rewrite ^/zenoh(/.*)$ $1 break;
206+
proxy_http_version 1.1;
207+
proxy_set_header Host $host;
208+
209+
include cors.conf;
210+
proxy_pass http://127.0.0.1:7117/;
211+
212+
# Required for WebSockets
213+
proxy_set_header Upgrade $http_upgrade;
214+
proxy_set_header Connection "Upgrade";
215+
}
216+
217+
location /zenoh-api/ {
218+
proxy_hide_header Access-Control-Allow-Origin;
219+
220+
rewrite ^/zenoh-api(/.*)$ $1 break;
221+
proxy_http_version 1.1;
222+
proxy_set_header Host $host;
223+
224+
include cors.conf;
225+
proxy_pass http://127.0.0.1:7118/;
226+
227+
# Required for WebSockets
228+
proxy_set_header Upgrade $http_upgrade;
229+
proxy_set_header Connection "Upgrade";
230+
}
231+
202232
location / {
203233
root /home/pi/frontend;
204234
try_files $uri $uri/ /index.html;

0 commit comments

Comments
 (0)