Skip to content

Commit

Permalink
Fix #1518: Prefer List.of over guava ImmutableList
Browse files Browse the repository at this point in the history
  • Loading branch information
banterCZ committed Dec 20, 2023
1 parent 207d0b8 commit 20acb7b
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@

package io.getlime.security.powerauth.app.webflow.configuration;

import com.google.common.collect.ImmutableList;
import io.getlime.security.powerauth.lib.webflow.authentication.service.AuthenticationManagementService;
import jakarta.servlet.http.HttpServletRequest;
import jakarta.servlet.http.HttpServletResponse;
Expand Down Expand Up @@ -51,6 +50,7 @@
import java.io.IOException;
import java.nio.charset.StandardCharsets;
import java.util.Collections;
import java.util.List;
import java.util.Objects;

/**
Expand Down Expand Up @@ -168,9 +168,9 @@ public CorsConfigurationSource corsConfigurationSource() {
// Configuration of CORS for client TLS certificate validation which can be requested from another host/port
final CorsConfiguration configuration = new CorsConfiguration();
configuration.setAllowedOrigins(Collections.singletonList(corsAllowOrigin));
configuration.setAllowedMethods(ImmutableList.of("GET", "POST", "OPTIONS"));
configuration.setAllowedMethods(List.of("GET", "POST", "OPTIONS"));
configuration.setAllowCredentials(true);
configuration.setAllowedHeaders(ImmutableList.of("Content-Type", "X-CSRF-Token"));
configuration.setAllowedHeaders(List.of("Content-Type", "X-CSRF-Token"));
final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/tls/client/login", configuration);
source.registerCorsConfiguration("/tls/client/approve", configuration);
Expand Down

0 comments on commit 20acb7b

Please sign in to comment.