# Disabling HTTP/S error pages

**URL:** <https://discourse.nodered.org/t/disabling-http-s-error-pages/61873>\
**Category:** General\
**Tags:** http-request\
**Created:** [27 April 2022 13:37 UTC](https://discourse.nodered.org/t/disabling-http-s-error-pages/61873 "2022-04-27T13:37:30Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [27 April 2022 13:37 UTC](https://discourse.nodered.org/t/disabling-http-s-error-pages/61873/1 "2022-04-27T13:37:30Z")

</div>

I'm working on a flow that is kicked off when a user sends a GET to the right URL. For the most part, things are working, though I'd really like to just never respond to requests to a URL I don't recognize. Instead, in such cases the requesting browser receives a 504 error page from openresty. Do we have any means by which we can completely disable this error response and just leave an invalid request hanging?

---

<div class="post-metadata">

**Author:** ![hardillb](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/hardillb/32/12373_2.png) [@hardillb](https://discourse.nodered.org/u/hardillb)\
**Post date:** [27 April 2022 14:02 UTC](https://discourse.nodered.org/t/disabling-http-s-error-pages/61873/2 "2022-04-27T14:02:27Z")

</div>

Sounds like we need some more context here.

Node-RED is running behind a proxy of some sort (openresty)?

From a pure Node-RED point of view, then just never letting the incoming message request `msg` (from the `http-in` node) reach the corresponding `http-response` node will result in the request hanging until it times out.

---

<div class="post-metadata">

**Author:** ![E1cid](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/e1cid/32/77971_2.png) [@E1cid](https://discourse.nodered.org/u/E1cid)\
**Post date:** [27 April 2022 14:06 UTC](https://discourse.nodered.org/t/disabling-http-s-error-pages/61873/3 "2022-04-27T14:06:00Z")

</div>

you should be able to use the :name parameters of the http in node  
simple example

```auto
[{"id":"29569f8d.f8b328","type":"http in","z":"bf9e1e33.030598","name":"","url":"/:path","method":"get","upload":false,"swaggerDoc":"","x":100,"y":100,"wires":[["4b1ac59d.8892fc","a8a71e83.19f658"]]},{"id":"4b1ac59d.8892fc","type":"debug","z":"bf9e1e33.030598","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":380,"y":60,"wires":[]},{"id":"a8a71e83.19f658","type":"switch","z":"bf9e1e33.030598","name":"","property":"req.params.path","propertyType":"msg","rules":[{"t":"eq","v":"path","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":300,"y":100,"wires":[["331a26c2.34ff52"]]},{"id":"331a26c2.34ff52","type":"http response","z":"bf9e1e33.030598","name":"","statusCode":"","headers":{},"x":470,"y":100,"wires":[]}]

```

it will only respond if path is /path. you could also do the switch node check on msg.req.url

---

<div class="post-metadata">

**Author:** ![JayDickson](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/jaydickson/32/90592_2.png) [@JayDickson](https://discourse.nodered.org/u/JayDickson)\
**Post date:** [27 April 2022 14:11 UTC](https://discourse.nodered.org/t/disabling-http-s-error-pages/61873/4 "2022-04-27T14:11:11Z")

</div>

You know what, I just realized I'd changed the proxy I was using on my test system and that may be where I am getting that 504. I forgot all about that and was chasing it as if there was some sort of internal proxy on the node-red side of things.

edit: Thank you, Ben. I was being dumb and my own proxy was throwing the 504. I'd forgotten that I hadn't customized my 504 page yet (just my 404 page) and thought it was coming from whatever node-red was using under the hood. Just ran a test from inside that LAN and i got no response as desired. I'm away from home at a conference and I'm approaching my cognitive limit I think 😭.

Goes to show that we need to consider the whole picture and fixating in one direction can be counterproductive.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)\
**Post date:** [26 June 2022 14:11 UTC](https://discourse.nodered.org/t/disabling-http-s-error-pages/61873/5 "2022-06-26T14:11:47Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
