Skip to content

Commit

Permalink
Subfolder websocket fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Steveorevo committed Oct 15, 2023
1 parent e3d469d commit e0f499d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions nginx/NodeApp.stpl
Original file line number Diff line number Diff line change
Expand Up @@ -30,5 +30,7 @@ server {
return 404;
}

proxy_hide_header Upgrade;

include %home%/%user%/conf/web/%domain%/nginx.ssl.conf_*;
}
3 changes: 2 additions & 1 deletion nodeapp.php
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,6 @@ public function generate_nginx_files( $nodeapp_folder, $inc_root = true ) {
proxy_set_header Connection "upgrade";
}' . "\n";
}
$nginx .= "# Override prev. proxy_hide_header Upgrade\nadd_header Upgrade \$http_upgrade always;";

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

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

0 comments on commit e0f499d

Please sign in to comment.