ATEST-259:

- clean up, improving naming
This commit is contained in:
Zellweger Christof Ralf
2015-10-28 13:03:18 +01:00
parent e7467aeea1
commit 00e181c8aa
2 changed files with 4 additions and 10 deletions

View File

@ -13,6 +13,7 @@ import javax.servlet.Filter;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@ -181,12 +182,8 @@ public class QueryRestConfig extends WebMvcConfigurerAdapter {
return new QueryValidator();
}
// @Bean
// public Filter regexCORSFilter() {
// return new RegexCORSFilter();
// }
@Bean
@ConditionalOnProperty("queryrest.cors.enable")
public Filter corsFilter() {
return new CorsFilter();
}

View File

@ -6,12 +6,9 @@ queryrest.default.response.fields=channel,pulseId,globalMillis,globalNanos,iocMi
queryrest.default.response.aggregations=min,max,sum
# enables / disables the CORS servlet filter. Adds multiple CORS headers to the response
queryrest.enableCORS=true
queryrest.cors.enable=true
# includes the CORS headers no matter what request or preflight was sent. If an Origin header is set, this header will be used.
# If no Origin header is set, '*' will be used.
queryrest.cors.forceallheaders=true
# defines a specific regex to be used in the Access-Control-Allow-Origin. This property needs to be specified
# but might be null or the empty string (""), i.e. don't comment it out.
# defines the allowed origins for CORS requests. Only relevant if queryrest.enableCORS==true (see above).
queryrest.cors.allowedorigins=http://localhost:8080, *