Remove POST from allowed HTTP methods on api server
This commit is contained in:
parent
2da505a778
commit
4a516329e5
1 changed files with 1 additions and 1 deletions
|
@ -105,7 +105,7 @@ wss.on("error", (err) => {
|
||||||
const httpServer = http.createServer();
|
const httpServer = http.createServer();
|
||||||
|
|
||||||
httpServer.on("request", async (req, res) => {
|
httpServer.on("request", async (req, res) => {
|
||||||
if (req.method !== "GET" && req.method !== "POST") {
|
if (req.method !== "GET") {
|
||||||
res.statusCode = 405;
|
res.statusCode = 405;
|
||||||
return res.end("405 Method Not Allowed");
|
return res.end("405 Method Not Allowed");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue