2023-04-28 00:38:44 +08:00
|
|
|
location /graphql-test {
|
|
|
|
proxy_pass http://127.0.0.1:3000;
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
}
|
|
|
|
|
|
|
|
# Websocket connection
|
2024-05-08 19:46:14 +08:00
|
|
|
location /graphql {
|
2023-04-28 00:38:44 +08:00
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $host;
|
2024-05-07 21:46:52 +08:00
|
|
|
#proxy_pass http://127.0.0.1:8085; #Hasura
|
2023-04-28 00:38:44 +08:00
|
|
|
proxy_pass http://127.0.0.1:8378; #Graphql Middleware
|
|
|
|
}
|
2023-12-14 02:19:17 +08:00
|
|
|
|
|
|
|
location /api/rest {
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $host;
|
2024-05-07 21:46:52 +08:00
|
|
|
proxy_pass http://127.0.0.1:8085; #Hasura
|
2023-12-14 02:19:17 +08:00
|
|
|
}
|
2024-05-04 01:42:54 +08:00
|
|
|
|
|
|
|
#Set cache system for client settings
|
|
|
|
location ~ ^/api/rest/(clientStartupSettings|clientSettings)/ {
|
|
|
|
#Store URL sessionToken once it will be injected as a header X-Session-Token
|
|
|
|
set $session_token "";
|
|
|
|
if ($args ~* "(?:^|&)sessionToken=([^&]+)") {
|
|
|
|
set $session_token $1;
|
|
|
|
}
|
|
|
|
auth_request /bigbluebutton/connection/checkAuthorization;
|
|
|
|
auth_request_set $meeting_id $sent_http_meeting_id;
|
|
|
|
|
|
|
|
#Remove sessionToken from URL once Hasura doesn't expect to receive it
|
|
|
|
if ($args ~* "^(.*&)?sessionToken=[^&]*(.*)$") {
|
|
|
|
set $args $1$2;
|
|
|
|
}
|
|
|
|
|
|
|
|
proxy_set_header x-session-token $session_token;
|
|
|
|
proxy_cache client_settings_cache;
|
2024-05-07 21:46:52 +08:00
|
|
|
proxy_cache_key "$uri|$meeting_id";
|
2024-05-04 01:42:54 +08:00
|
|
|
proxy_cache_use_stale updating;
|
|
|
|
proxy_cache_valid 24h;
|
|
|
|
proxy_cache_lock on;
|
|
|
|
add_header X-Cached $upstream_cache_status;
|
|
|
|
|
|
|
|
proxy_http_version 1.1;
|
|
|
|
proxy_set_header Upgrade $http_upgrade;
|
|
|
|
proxy_set_header Connection "Upgrade";
|
|
|
|
proxy_set_header Host $host;
|
2024-05-07 21:46:52 +08:00
|
|
|
proxy_pass http://127.0.0.1:8085; #Hasura
|
2024-05-04 01:42:54 +08:00
|
|
|
}
|