Access-Control-Allow-Origin header for error responses generated by MG_WEB

36 vistas
Ir al primer mensaje no leído

OldMster

no leída,
2 sept 2021, 5:03:12 p.m.2/9/21
para Enterprise Web Developer Community
Rob/Chris,
Is there a way to add additional headers for MG_WEB generated error responses (I.E. 500 errors due to DB connectivity problem)?  It would be helpful to be able to add the Access-Control-Allow-Origin header.  Otherwise these error responses won't display in modern browsers do to CORS errors - and I end up chasing a CORS problem until I look at the MG_WEB log and see it sent an error response.

Thanks!
Mark

chris....@gmail.com

no leída,
2 sept 2021, 6:19:09 p.m.2/9/21
para enterprise-web-de...@googlegroups.com

Mark,

 

All we currently have is a way to override the mg_web generated errors with custom error forms – see section 4 in the doc (page 28).

 

We don’t have a mechanism for supplementing these custom forms with your own headers, unfortunately.  This would have to be an enhancement for the future.

 

Of course, error messages generated from M – including the response headers – are under your control anyway.

 

Regards,

 

Chris.

--
You received this message because you are subscribed to the Google Groups "Enterprise Web Developer Community" group.
To unsubscribe from this group and stop receiving emails from it, send an email to enterprise-web-develope...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/enterprise-web-developer-community/27015932-4cc5-4686-bd6c-44a20790026dn%40googlegroups.com.

OldMster

no leída,
2 sept 2021, 6:53:55 p.m.2/9/21
para Enterprise Web Developer Community
Ok, thanks Chris, please consider it for a future enhancement.  The errors I generate are indeed under my control, and have the appropriate headers.  I was setting up a new system, and kept getting CORS errors.  It was driving me crazy since I KNEW I had fixed the CORS header issues a long time ago.  I finally looked at the MG_WEB log and saw it was unable to connect to the DB and had returned it's own error message without the headers, so then I could turn my attention to the real problem!

Mark
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos