Add error message when the proxy doesn't route websockets correctly

This commit is contained in:
Daniel García 2018-09-11 17:09:33 +02:00
parent 434551e012
commit d66d4fd87f

View File

@ -6,7 +6,12 @@ use auth::Headers;
use db::DbConn;
pub fn routes() -> Vec<Route> {
routes![negotiate]
routes![negotiate, websockets_err]
}
#[get("/hub")]
fn websockets_err() -> JsonResult {
err!("'/notifications/hub' should be proxied towards the websocket server, otherwise notifications will not work. Go to the README for more info.")
}
#[post("/hub/negotiate")]