ensure that 404 and 500 have CORS for the API, including DEBUG mode (bug...

... 970641)
Ah good point, that's cleaner.