menu

Mockoon

Mockoon's official community. Get help, discuss new features.

Channels
Team

404 Page not adding custom headers

July 9, 2019 at 4:16am

404 Page not adding custom headers

July 9, 2019 at 4:16am

I ran into this issue earlier tonight and I'm not sure whether or not it is intentional. For some debugging reasons I have the CORS headers added to my request, but when I try to get a bad route eg /foobar, for a resource that doesn't exist, the response does not include the custom headers. Is this intentional?


July 9, 2019 at 4:17am

I can understand a use case to not include the custom headers on a 404, but I can also see where that would be helpful.

  • reply
  • like

Hi, this is unintentional. 404 are directly handled by ExpressJS and I didn't do anything that would add the CORS headers to the ExpressJS response. I think you can open an issue to track this

  • reply
  • like