log_format postdata escape=json '$remote_addr - $remote_user [$time_local] '
'"$request" $status $bytes_sent '
'"$http_referer" "$http_user_agent" "$request_body"';
server {
...
access_log /home/user/w.log postdata;
location / {
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_redirect off;
proxy_pass $scheme://127.0.0.1:$server_port/success;
}
location /success {
add_header Content-Type text/plain;
return 200 'OK';
}
let wsSchema;
if (document.location.protocol === "http:") {
wsSchema = "ws:";
} else if (document.location.protocol === "https:") {
wsSchema = "wss:";
}
let ws = new WebSocket(wsSchema + "//" + document.location.host + "/entry");
$token = 'sdfskfdj:<eiuriwo';
echo filter_var($token,FILTER_SANITIZE_STRING) . PHP_EOL;
sdfskfdj:<eiuriwo
и оказалось там еще куча подводных камней.