Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add cargo dependency tower-http
With the new Axum implementation for the API the browser does not make request to the API becuase of the Cross-Origin Resource Sharing (CORS) policy. By default there is no header `Access-Control-Allow-Origin` and it does not allow the request. You can be permissive by adding a layer to the router: ``` Router::new().nest("/v1", api_routes).layer(CorsLayer::permissive()) ``` For the time being you need to change that line manually when you want to setup a dev env with the banckend and the frontend using different ports.
- Loading branch information