Subject: POST /api/x returns 405 from nginx before reaching my Node app

Posted by user_c13215 in general.

Subject: POST /api/x returns 405 from nginx before reaching my Node app Server: bb9d465b Hi, My Node.js app on this server proxies requests to an external API. All GET requests work and other POST endpoints reach the app, but POST to /api/x is rejected with a 405 HTML page generated by nginx, so the request never reaches my application. Evidence (2026 12 02 17:00:53 GMT, CF RAY a63be3ee3b585906 WAW): POST https://tahcmils.wisp.uno/api/x 405 Method Not Allowed Content Type: text/html; charset=utf 8 body: <html <head <title 405 Not Allowed</title </head <body <center <h1 405 Not Allowed</h1 </center <hr <center nginx</center </body </html POST https://tahcmils.wisp.uno/api/auth/email/request code 400 (reaches app) GET https://tahcmils.wisp.uno/api/x 404 (reaches app) GET https://tahcmils.wisp.uno/ health 200 {"ok":true,...} The same request works when I run the identical server.js locally, so the block happens in front of the container. Earlier the same 405 appeared for other request shapes as well: POST /api/x?anonop=<value POST /api/x with header X Anon Op: <value Now it affects POST /api/x regardless of query/headers/body. I believe a WAF/security rule (ModSecurity/CRS, CrowdSec, or an nginx location/limit except) is matching these requests. Could you please: 1. check the nginx/WAF logs for this request (CF RAY a63be3ee3b585906 WAW) and tell me which rule returns 405; 2. remove the rule or whitelist POST /api/x for this server. This is a legitimate API proxy for a chat frontend hosted on GitHub Pages, not a scanner or abuse traffic. The endpoint only forwards JSON to an upstream API and requires CORS, which the Node app already handles. Thanks.

Replies

Byte (AI assistant)

Your node is online, so this doesn’t look like a node outage. The 405 could be from the subdomain proxy or from middleware before your route handler; the response page alone doesn’t identify which. 1. Send the same POST to the server’s allocated from the panel, bypassing the subdomain. 2. Check whether it appears in your app’s request logs. If the direct request works but the subdomain still returns 405, report it in the Wispbyte Discord for platform side investigation. Include the timestamp and CF RAY you posted, but no secrets. 3. If both requests return 405, check your app’s routing and middleware for that path and method. The Subdomains guide covers the beta subdomain feature.

user_c13215

@byte POST /api/x on subdomain returns 405 from nginx before reaching the app. Server: tahcmils.wisp.uno (allocated 78.154.103.13:17471) Time: 2026 12 02 17:10:11 GMT CF RAY: a63bf18f597b1207 WAW Subdomain: POST https://tahcmils.wisp.uno/api/x Content Type: application/json body: {"c":"eyJvcCI6Im5ldyIsImJvZHkiOnt9fQ=="} 405 Method Not Allowed, text/html, nginx error page Direct to allocated port: POST http://78.154.103.13:17471/api/x (same headers and body) 502 application/json {"error":"22.do недоступен: ..."} i.e. the request reaches my Node app and my route handler runs (the 502 is my app's upstream error, not a routing problem) GET https://tahcmils.wisp.uno/ health 200 {"ok":true,...} POST https://tahcmils.wisp.uno/api/auth/email/request code 400 (reaches app) So the 405 is produced by the subdomain proxy/WAF in front of the container, not by my app. Before it started, the same endpoint worked through the subdomain, and the block also appeared for other request shapes: POST /api/x?anonop=<value 405 POST /api/x with header X Anon Op: <value 405 Now it is any POST /api/x. Could you check the subdomain proxy / WAF rule matching POST /api/x for this server (CF RAY a63bf18f597b1207 WAW) and remove it or whitelist the path?

Byte (AI assistant)

That comparison confirms it: the subdomain path is returning 405 before the request reaches your app, while the direct port request reaches your route. The direct 502 is a separate upstream error from the app. I can’t change or whitelist the proxy rule from the forum. Please report this in the Wispbyte Discord with the two timestamps and CF RAY IDs, the affected path and method, and the direct port vs. subdomain results. Don’t include tokens or other secrets.

Related discussions

Wispbyte Community Forum