Skip to content

Commit

Permalink
Merge pull request #233 from InseeFr/fix/cors-headers
Browse files Browse the repository at this point in the history
fix: cors headers
  • Loading branch information
BettyB979 authored Apr 8, 2024
2 parents c625075 + 21b4efc commit 818bcd2
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<description>Modules for queen back-office</description>

<properties>
<revision>4.2.3</revision>
<revision>4.2.5</revision>
<changelist></changelist>
<java.version>21</java.version>
<maven.compiler.source>21</maven.compiler.source>
Expand Down
2 changes: 1 addition & 1 deletion queen-application/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@
<plugin>
<groupId>org.jacoco</groupId>
<artifactId>jacoco-maven-plugin</artifactId>
<version>0.8.11</version>
<version>0.8.12</version>
<executions>
<execution>
<id>report-aggregate</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ public class CorsConfig {
protected CorsConfigurationSource corsConfigurationSource(ApplicationProperties applicationProperties) {
CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOriginPatterns(applicationProperties.corsOrigins());
configuration.setAllowedMethods(List.of("GET", "PUT", "POST", "DELETE", "OPTIONS"));
configuration.setAllowedHeaders(List.of("Authorization", "Content-Type"));
configuration.setAllowedMethods(List.of("GET", "PUT", "POST", "DELETE", "OPTIONS", "PATCH"));
configuration.setAllowedHeaders(List.of("Authorization", "Content-Type", "Access-Control-Allow-Origin"));
configuration.addExposedHeader("Content-Disposition");
configuration.setMaxAge(3600L);
configuration.setAllowCredentials(true);
Expand Down

0 comments on commit 818bcd2

Please sign in to comment.