# Class AdkWebCorsConfig

java.lang.Object
com.google.adk.web.config.AdkWebCorsConfig

@Configuration public class AdkWebCorsConfig extends Object
Configuration class for setting up Cross-Origin Resource Sharing (CORS) in the ADK Web application. This class defines beans for configuring CORS settings based on properties defined in `AdkWebCorsProperties`.

CORS allows the application to handle requests from different origins, enabling secure communication between the frontend and backend services.

Beans provided:

- `CorsConfigurationSource`: Configures CORS settings such as allowed origins, methods, headers, credentials, and max age.
- `CorsFilter`: Applies the CORS configuration to incoming requests.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `AdkWebCorsConfig()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `org.springframework.web.cors.CorsConfigurationSource`
  `corsConfigurationSource(AdkWebCorsProperties corsProperties)`
  `org.springframework.web.filter.CorsFilter`
  `corsFilter(org.springframework.web.cors.CorsConfigurationSource corsConfigurationSource)`

  ### Methods inherited from class Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### AdkWebCorsConfig

    public AdkWebCorsConfig()

- ## Method Details

  - ### corsConfigurationSource

    @Bean public org.springframework.web.cors.CorsConfigurationSource corsConfigurationSource(AdkWebCorsProperties corsProperties)

  - ### corsFilter

    @Bean public org.springframework.web.filter.CorsFilter corsFilter(org.springframework.web.cors.CorsConfigurationSource corsConfigurationSource)