Add CORS middleware and update documentation
Add CORS middleware by default as it is best practice. Then make it flexible in order for the user to follow advice in docs when in staging or production and instead of going into the source code, manipulate the CORS origins, methods and headers via the environment variables.
NOTE: I have not tested fully this change. I can do it tomorrow or if you can help validate, that would be great.
@LucasQR test this one when possible
@LucasQR test this one when possible
if it helps I have been using already
@rragundez looks great! Can you please just update the readme (we changed the structure a lot), add example in the .env.example and maybe also in the docs? Then I can merge
I'll make the requested changes and test the code a bit more so it can be merged
I'll be adding a PR for environment variables of the backend and frontend host, this will make it easier for the user to specify the origins without hardcoding in the source code. In addition i also need these env variables for defining the redirect URLS when using oauth, and they are handy for other uses in an application backend.