Loading pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ <groupId>es.redmic.time-series</groupId> <artifactId>time-series</artifactId> <packaging>pom</packaging> <version>0.3.0</version> <version>0.3.0-feature-corsAllowed</version> <name>Time series</name> <properties> Loading time-series-commands/pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ <parent> <groupId>es.redmic.time-series</groupId> <artifactId>time-series</artifactId> <version>0.3.0</version> <version>0.3.0-feature-corsAllowed</version> </parent> <modelVersion>4.0.0</modelVersion> Loading time-series-commands/src/main/java/es/redmic/timeseriescommands/config/CorsConfiguration.java 0 → 100644 +34 −0 Original line number Diff line number Diff line package es.redmic.timeseriescommands.config; /*- * #%L * Time series commands * %% * Copyright (C) 2019 REDMIC Project / Server * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration public class CorsConfiguration implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**").allowedMethods("GET", "PUT", "POST", "DELETE"); } } time-series-commands/src/main/java/es/redmic/timeseriescommands/config/Oauth2SecurityConfiguration.java +2 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ public class Oauth2SecurityConfiguration { public void configure(HttpSecurity http) throws Exception { // @formatter:off http.cors(); http.anonymous().and().authorizeRequests() .antMatchers(HttpMethod.GET, "/actuator/**").permitAll(); Loading time-series-lib/pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ <parent> <groupId>es.redmic.time-series</groupId> <artifactId>time-series</artifactId> <version>0.3.0</version> <version>0.3.0-feature-corsAllowed</version> </parent> <modelVersion>4.0.0</modelVersion> Loading Loading
pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -12,7 +12,7 @@ <groupId>es.redmic.time-series</groupId> <artifactId>time-series</artifactId> <packaging>pom</packaging> <version>0.3.0</version> <version>0.3.0-feature-corsAllowed</version> <name>Time series</name> <properties> Loading
time-series-commands/pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -5,7 +5,7 @@ <parent> <groupId>es.redmic.time-series</groupId> <artifactId>time-series</artifactId> <version>0.3.0</version> <version>0.3.0-feature-corsAllowed</version> </parent> <modelVersion>4.0.0</modelVersion> Loading
time-series-commands/src/main/java/es/redmic/timeseriescommands/config/CorsConfiguration.java 0 → 100644 +34 −0 Original line number Diff line number Diff line package es.redmic.timeseriescommands.config; /*- * #%L * Time series commands * %% * Copyright (C) 2019 REDMIC Project / Server * %% * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. * #L% */ import org.springframework.context.annotation.Configuration; import org.springframework.web.servlet.config.annotation.CorsRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @Configuration public class CorsConfiguration implements WebMvcConfigurer { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping("/**").allowedMethods("GET", "PUT", "POST", "DELETE"); } }
time-series-commands/src/main/java/es/redmic/timeseriescommands/config/Oauth2SecurityConfiguration.java +2 −0 Original line number Diff line number Diff line Loading @@ -38,6 +38,8 @@ public class Oauth2SecurityConfiguration { public void configure(HttpSecurity http) throws Exception { // @formatter:off http.cors(); http.anonymous().and().authorizeRequests() .antMatchers(HttpMethod.GET, "/actuator/**").permitAll(); Loading
time-series-lib/pom.xml +1 −1 Original line number Diff line number Diff line Loading @@ -4,7 +4,7 @@ <parent> <groupId>es.redmic.time-series</groupId> <artifactId>time-series</artifactId> <version>0.3.0</version> <version>0.3.0-feature-corsAllowed</version> </parent> <modelVersion>4.0.0</modelVersion> Loading