-1
I have Cors problem in Heroku.
Cors class
@Configuration
public class WebConfig implements WebMvcConfigurer {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping("/**")
.allowedMethods("*")
;
}
}
Procfile -> web: java -Dserver.port=$PORT -Dspring.profiles.active=Prod -jar target/queroparcelado-0.0.1-SNAPSHOT. jar release: . /mvnw flyway:migrate
system properties. -> java.runtime.version=15
Error that appears in the ui console
Access to Xmlhttprequest at 'https://queroparcelado-api.herokuapp.com/client' from origin 'https://queroparcelado-ui.herokuapp.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested source.
Error that appears in the Heroku api console
at=error code=H10 desc="App Crashed" method=GET path="/client" host=queroparcelado-api.herokuapp.com request_id=bd529d7b-bbac-48eb-9c82-722379fbb59f Fwd="191.190.92.249" Dyno= connect service= status=503 bytes= Protocol=https