Class CrossOriginUtil


  • public final class CrossOriginUtil
    extends java.lang.Object
    Utility classes to work with CrossOrigin.
    Since:
    3.9.0
    • Field Detail

      • MEMBER_ALLOWED_ORIGINS

        public static final java.lang.String MEMBER_ALLOWED_ORIGINS
        See Also:
        Constant Field Values
      • MEMBER_ALLOWED_ORIGINS_REGEX

        public static final java.lang.String MEMBER_ALLOWED_ORIGINS_REGEX
        See Also:
        Constant Field Values
      • MEMBER_ALLOWED_HEADERS

        public static final java.lang.String MEMBER_ALLOWED_HEADERS
        See Also:
        Constant Field Values
      • MEMBER_EXPOSED_HEADERS

        public static final java.lang.String MEMBER_EXPOSED_HEADERS
        See Also:
        Constant Field Values
      • MEMBER_ALLOWED_METHODS

        public static final java.lang.String MEMBER_ALLOWED_METHODS
        See Also:
        Constant Field Values
      • MEMBER_ALLOW_CREDENTIALS

        public static final java.lang.String MEMBER_ALLOW_CREDENTIALS
        See Also:
        Constant Field Values
    • Method Detail

      • getCorsOriginConfigurationForRequest

        @NonNull
        public static java.util.Optional<CorsOriginConfiguration> getCorsOriginConfigurationForRequest​(@NonNull
                                                                                                       io.micronaut.http.HttpRequest<?> request)
        Parameters:
        request - the HTTP request for the configuration
        Returns:
        the cors origin configuration for the given request