Answer the question
In order to leave comments, you need to log in
How to get a token if there is a CSRF Token in the form?
Hello. There is a bot that does certain actions on the site and recently a new request appeared on the site, after which the form itself appears (which used to be right away) and, most importantly, a CSRF Token appeared in the form. I changed the algorithm of the bot a little now 2 seconds before sending forms, the bot makes PRE-requests, it helped a little. But the site does not give out a token very often. Question: how can I implement the bot's algorithm to receive a token (if possible). The bot is written in PHP and sends requests via GuzzleHTTP. Thank you
Answer the question
In order to leave comments, you need to log in
But in the penultimate line you do not have a semicolon. Did you copy it wrong too or is it really not there?
After this
root /var/www/html
And read the documentation .
Must be http:// prefixproxy_pass http://127.0.0.1:8080;
At least I do not see the closing bracket of the server section
server {
listen 80 default_server;
root /var/www/html;
index index.php index.html index.htm index.nginx-debian.html;
server_name localhost 127.0.0.1;
access_log /var/log/nginx/access.log;
location / {
proxy_pass 127.0.0.1:80;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
proxy_connect_timeout 120;
proxy_send_timeout 120;
proxy_read_timeout 180;
try_files $uri $uri/ =404;
}
location ~*\.(jpg|jpeg|gif|png|ico|css|bmp|swf|js|html|txt)${
root /var/www/html
}
}
Learn to read the logs, usually there is all the debug info. (/var/log/nginx/*)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question