Israel-Laguan / error-microservice

GNU General Public License v3.0
0 stars 0 forks source link

Added cors middleware #3

Closed heliomar-pena closed 2 years ago

heliomar-pena commented 2 years ago

I added the middleware to handle the access-control-allow-origin header, so block the requests from unexpected origins.

Now you can add the allowed sites in the .env file separated by commas ,


I tested this by giving access to the Rust documentation and making a request to the endpoint:

imagen

And then making a request from an unexpected website:

imagen