sqcp
sqcp copied to clipboard
[PANEL]
Unable to connect to the server!
squad@Landau:~/sqcp/backend$ yarn start yarn run v1.22.19 $ node App.js [Express][1] Registered routes from: v1/Api_Auth.js [Express][1] Registered routes from: v1/Api_Rcon.js [Express][1] Registered routes from: v1/Api_Server.js [Express][1] Registered routes from: v1/Api_Stats.js [Express][1] Registered routes from: v1/Api_User.js [Express][1] Listening on port: 3000 [DataBase][1] Data Base Connection Successfully Established
Everything has been established adequately. Without errors, it simply does not let you into the admin panel.
Can you screenshot the output of the dev console in your browser?
To open it, press F12
(or CTRL + SHIFT + I
) and click on Console
tab.
Most likely it's an issue with CORS policy.
Yes, of course!
http://wsquad.ru:3000/login This is the address I'm going to. POST http://wsquad.ru/api/v1/auth/login net::ERR_CONNECTION_REFUSED And this is the error that the console gives out. Maybe there is some problem here?: But I kind of did everything according to the instructions. I apologize if I ask stupid questions, unfortunately I do not have extensive knowledge in this area 3=
http://wsquad.ru:3000/login This is the address I'm going to. POST http://wsquad.ru/api/v1/auth/login net::ERR_CONNECTION_REFUSED And this is the error that the console gives out. Maybe there is some problem here?: But I kind of did everything according to the instructions. I apologize if I ask stupid questions, unfortunately I do not have extensive knowledge in this area 3=
I suggest you make a subdomain and map it as a proxy in Nginx: https://www.youtube.com/watch?v=1GSZcatwLtc
The frontend should be hosted by the backend application, not run as vue development server (mentioning this just in case).
This is most likely an issue with CORS, I suggest also looking at setting your cors policy to your domain, by default it's unrestricted.
Change this part to set the cors rule for your domain, examples: https://www.npmjs.com/package/cors
Also, one more thing, make sure that in the front end when setting the URL, there is no trailing slash (/
)