Support CORS Preflight requests

When a publishing request is issued by some electron or embedded webkit applications, the request may be treated as CORS request.
A preflight request (OPTIONS request) will be sent before the real request during performing the request.
Currently write.as responds 404 error for OPTIONS preflight requests.

Please support CORS preflight requests.

I think supporting this feature would actually fix my Blazor WASM apps.

We can absolutely do this. Are there any endpoints in particular we should start with for you both?

I prefer ‘/api/posts’. My application is to publish posts from front end code. So enabling OPTIONS method for ‘/api/posts’ will be great help to get my app done.
Thanks.

1 Like

Thanks for considering this. Looking at the code for my Blazor apps, my most used endpoint seems to be this one:

api/collections/{0}/posts?page={1}

{0} here is the write.as alias and {1} is the page number.