Skip to content

Commit e0f499d

Browse files
committed
Subfolder websocket fix
1 parent e3d469d commit e0f499d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

nginx/NodeApp.stpl

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,5 +30,7 @@ server {
3030
return 404;
3131
}
3232

33+
proxy_hide_header Upgrade;
34+
3335
include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
3436
}

nodeapp.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,6 @@ public function generate_nginx_files( $nodeapp_folder, $inc_root = true ) {
254254
proxy_set_header Connection "upgrade";
255255
}' . "\n";
256256
}
257-
$nginx .= "# Override prev. proxy_hide_header Upgrade\nadd_header Upgrade \$http_upgrade always;";
258257

259258
// Write the nginx config nodeapp subfolder file to the user's conf folder
260259
if ($nginx != '') {
@@ -269,6 +268,8 @@ public function generate_nginx_files( $nodeapp_folder, $inc_root = true ) {
269268
$nginx = $args['nginx'];
270269
file_put_contents( "/home/$user/conf/web/$domain/nginx.conf_nodeapp", $nginx );
271270

271+
// Overrite the proxy_hide_header in the SSL config file
272+
$nginx .= "# Override prev. proxy_hide_header Upgrade\nadd_header Upgrade \$http_upgrade always;";
272273
$args = $hcpp->do_action( 'nodeapp_subfolder_nginx_ssl_conf', $args );
273274
$nginx = $args['nginx'];
274275
file_put_contents( "/home/$user/conf/web/$domain/nginx.ssl.conf_nodeapp", $nginx );

0 commit comments

Comments
 (0)