Class CorsHandler

  • All Implemented Interfaces:
    com.hexagonkt.handlers.Handler , com.hexagonkt.http.handlers.HttpHandler

    
    public final class CorsHandler
     implements HttpHandler
                        
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private final Function1<Context<HttpCall>, Context<HttpCall>> callback
      private final HttpPredicate handlerPredicate
      private final Function1<Context<HttpCall>, Boolean> predicate
    • Constructor Summary

      Constructors 
      Constructor Description
      CorsHandler(CorsCallback cors)
      CorsHandler(String pattern, String allowedOrigin, Set<HttpMethod> allowedMethods, Set<String> allowedHeaders, Set<String> exposedHeaders, Boolean supportCredentials, HttpStatus preFlightStatus, Long preFlightMaxAge)
      CorsHandler(String pattern, CorsCallback cors)
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      • Methods inherited from class com.hexagonkt.handlers.Handler

        getCallback, getPredicate, process
      • Methods inherited from class com.hexagonkt.http.handlers.HttpHandler

        addPrefix, byMethod, filter, getHandlerPredicate, process, processHttp
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CorsHandler

        CorsHandler(String pattern, String allowedOrigin, Set<HttpMethod> allowedMethods, Set<String> allowedHeaders, Set<String> exposedHeaders, Boolean supportCredentials, HttpStatus preFlightStatus, Long preFlightMaxAge)
      • CorsHandler

        CorsHandler(String pattern, CorsCallback cors)
    • Method Detail