How Do I Intercept OPTIONS Preflight for CORS?

When a preflight request is made to OPTIONS, I see no way of intercepting that request. I want to be able to set my own headers for CORS purposes. For example, requests that have credentials can't use Xano's default Access-Control-Allow-Origin: *. If I can't set the Access-Control-Allow-Origin to a specific origin, then my request is denied by the browser.

This is not a problem for POST requests, because Xano allows you to set headers. However, OPTIONS is not available.

How can I do this in Xano?

1
5 replies