ATEST-259:
- clean up, improving naming
This commit is contained in:
@ -13,6 +13,7 @@ import javax.servlet.Filter;
|
|||||||
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Import;
|
import org.springframework.context.annotation.Import;
|
||||||
@ -181,12 +182,8 @@ public class QueryRestConfig extends WebMvcConfigurerAdapter {
|
|||||||
return new QueryValidator();
|
return new QueryValidator();
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Bean
|
|
||||||
// public Filter regexCORSFilter() {
|
|
||||||
// return new RegexCORSFilter();
|
|
||||||
// }
|
|
||||||
|
|
||||||
@Bean
|
@Bean
|
||||||
|
@ConditionalOnProperty("queryrest.cors.enable")
|
||||||
public Filter corsFilter() {
|
public Filter corsFilter() {
|
||||||
return new CorsFilter();
|
return new CorsFilter();
|
||||||
}
|
}
|
||||||
|
@ -6,12 +6,9 @@ queryrest.default.response.fields=channel,pulseId,globalMillis,globalNanos,iocMi
|
|||||||
queryrest.default.response.aggregations=min,max,sum
|
queryrest.default.response.aggregations=min,max,sum
|
||||||
|
|
||||||
# enables / disables the CORS servlet filter. Adds multiple CORS headers to the response
|
# 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.
|
# 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.
|
# If no Origin header is set, '*' will be used.
|
||||||
queryrest.cors.forceallheaders=true
|
queryrest.cors.forceallheaders=true
|
||||||
|
# defines the allowed origins for CORS requests. Only relevant if queryrest.enableCORS==true (see above).
|
||||||
# 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.
|
|
||||||
queryrest.cors.allowedorigins=http://localhost:8080, *
|
queryrest.cors.allowedorigins=http://localhost:8080, *
|
Reference in New Issue
Block a user