CORS hinzugefügt

This commit is contained in:
Tobias Peper 2025-03-22 21:03:25 +01:00
parent 45ded979d5
commit f6eb147b5e

View File

@ -15,6 +15,7 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.jdbc.core.JdbcTemplate;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
@ -88,6 +89,7 @@ class VzRestController {
return prices;
}
@CrossOrigin(origins = "http://localhost:4200")
@GetMapping(value="/rest-vz/stats", produces = {"application/json"})
Statistics getStats(@RequestParam(name = "timestampStart", defaultValue = "-1")long timestampStart,
@RequestParam(name = "timestampEnd", defaultValue = "-1")long timestampEnd,