From 1a1e66fa56a7da37da17aa187cacc1f8a1a4c3d3 Mon Sep 17 00:00:00 2001 From: Volodymyr Babak Date: Thu, 21 Mar 2019 17:38:27 +0200 Subject: [PATCH] Fixed CORS mapping --- application/src/main/resources/thingsboard.yml | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/application/src/main/resources/thingsboard.yml b/application/src/main/resources/thingsboard.yml index f52bfccabc..1069f9d6e6 100644 --- a/application/src/main/resources/thingsboard.yml +++ b/application/src/main/resources/thingsboard.yml @@ -273,23 +273,17 @@ updates: spring.mvc.cors: mappings: # Intercept path - "[/api/auth/**]": + "[/api/**]": #Comma-separated list of origins to allow. '*' allows all origins. When not set,CORS support is disabled. allowed-origins: "*" #Comma-separated list of methods to allow. '*' allows all methods. - allowed-methods: "POST,GET,OPTIONS" + allowed-methods: "*" #Comma-separated list of headers to allow in a request. '*' allows all headers. allowed-headers: "*" #How long, in seconds, the response from a pre-flight request can be cached by clients. max-age: "1800" #Set whether credentials are supported. When not set, credentials are not supported. allow-credentials: "true" - "[/api/v1/**]": - allowed-origins: "*" - allowed-methods: "*" - allowed-headers: "*" - max-age: "1800" - allow-credentials: "true" # spring serve gzip compressed static resources spring.resources.chain: