All together:
(proxy_options) {
header_up X-Real-IP {remote_host}
header_up X-Forwarded-Proto {scheme}
header_up Access-Control-Allow-Origin *
header_up Access-Control-Allow-Credentials true
header_up Access-Control-Allow-Headers Cache-Control,Content-Type
}
localhost {
route /weather/* {
uri replace /weather /socket.io
reverse_proxy http://localhost:3010 {
import proxy_options
}
}
route /ptz/* {
uri replace /ptz /socket.io
reverse_proxy http://localhost:3006 {
import proxy_options
}
}
route /liveview/* {
uri replace /liveview /socket.io
reverse_proxy http://localhost:3004 {
import proxy_options
}
}
route /archive/* {
uri replace /archive /socket.io
reverse_proxy http://localhost:3003 {
import proxy_options
}
}
route /alarms/* {
uri replace /alarms /socket.io
reverse_proxy http://localhost:3002 {
import proxy_options
}
}
route /console_socket/* {
uri replace /console_socket /console/socket.io
reverse_proxy http://localhost:3001 {
import proxy_options
}
}
route /web_app_socket/* {
uri replace /web_app_socket /web/socket.io
reverse_proxy http://localhost:3001 {
import proxy_options
}
}
route {
reverse_proxy http://localhost:3001 {
import proxy_options
}
}
}
(Make sure to double-check I didn’t make any mistakes!! )