ambiorix-web / ambiorix

🖥️ Web framework for R
http://ambiorix.dev
GNU General Public License v3.0
211 stars 9 forks source link

Tests #21

Closed JohnCoene closed 2 years ago

JohnCoene commented 4 years ago

Add tests.

Need input/ideas on how to do this best for web servers, .e.g.: mock requests, etc.

vikram-rawat commented 3 years ago

I couldn't find CORS in documents... Just wanted to know if it has been implemented yet.

JohnCoene commented 3 years ago

CORS is just about custom headers to the best of my understanding, this can be done with Ambiorix. Could you elaborate?

vikram-rawat commented 3 years ago

if I just create an API. I would need an authentication mechanism and a Cross origin reference to let some server talk to it... An API running on port 3000 can not be accessed by a webpage served on 4000... This is how I understand CORS... Most of the framework allow you to provide a set of links from where the API can be called...

JohnCoene commented 3 years ago

An API running on port 3000 can be accessed by another on port 4000 by default. To the best of understanding, CORS works the other way around it's to restrict access.

This takes the form of headers which can be handled here too, it would take the form of a middleware that adds said headers to all requests.