From 1e8547c97b995a5485d6ae8ca6458004ebce7df8 Mon Sep 17 00:00:00 2001 From: ewilly Date: Thu, 20 Jul 2023 21:07:42 +0200 Subject: [PATCH] Add api --- conf/nginx.conf | 11 +++++++++++ manifest.toml | 5 +++++ 2 files changed, 16 insertions(+) diff --git a/conf/nginx.conf b/conf/nginx.conf index 59d60dc..5090f04 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -9,6 +9,17 @@ location / { proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection $connection_upgrade; proxy_set_header X-Forwarded-Host $http_host; + +location /api/websocket { + proxy_pass http://localhost:__PORT__/api/websocket; + proxy_set_header Host $host; + proxy_redirect http:// https://; + proxy_http_version 1.1; + proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; + proxy_set_header Upgrade $http_upgrade; + proxy_set_header Connection $connection_upgrade; + proxy_set_header X-Forwarded-Host $http_host; +} # Include SSOWAT user panel. include conf.d/yunohost_panel.conf.inc; diff --git a/manifest.toml b/manifest.toml index 6f43aab..97f5b07 100644 --- a/manifest.toml +++ b/manifest.toml @@ -92,6 +92,11 @@ ram.runtime = "2G" [resources.permissions] main.url = "/" + api.url = "/api" + api.auth_header = false + api.show_tile = false + api.protected= true + api.allowed = ["visitors", "all_users"] [resources.ports] main.default = 8123