Class CorsHandler

  • All Implemented Interfaces:,,

    public class CorsHandler
    Handles Cross Origin Resource Sharing (CORS) requests.

    This handler can be configured using one or more CorsConfig, please refer to this class for details about the configuration options available. NOTE: This class should be removed after is solved.

    • Nested Class Summary

      • Nested classes/interfaces inherited from interface
    • Constructor Summary

      Constructor Description
      CorsHandler​(io.netty.handler.codec.http.cors.CorsConfig config)
      Creates a new instance with a single CorsConfig.
      CorsHandler​(List<io.netty.handler.codec.http.cors.CorsConfig> configList, boolean isShortCircuit)
      Creates a new instance with the specified config list.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void channelRead​( ctx, Object msg)  
      void write​( ctx, Object msg, promise)  
      • Methods inherited from class

        bind, close, connect, deregister, disconnect, flush, read
      • Methods inherited from class

        channelActive, channelInactive, channelReadComplete, channelRegistered, channelUnregistered, channelWritabilityChanged, exceptionCaught, userEventTriggered
      • Methods inherited from class

        ensureNotSharable, handlerAdded, handlerRemoved, isSharable
      • Methods inherited from interface

        handlerAdded, handlerRemoved
    • Constructor Detail

      • CorsHandler

        public CorsHandler​(io.netty.handler.codec.http.cors.CorsConfig config)
        Creates a new instance with a single CorsConfig.
      • CorsHandler

        public CorsHandler​(List<io.netty.handler.codec.http.cors.CorsConfig> configList,
                           boolean isShortCircuit)
        Creates a new instance with the specified config list. If more than one config matches a certain origin, the first in the List will be used.
        configList - List of CorsConfig
        isShortCircuit - Same as CorsConfig.shortCircuit but applicable to all supplied configs.
    • Method Detail

      • channelRead

        public void channelRead​( ctx,
                                Object msg)
                         throws Exception
        Specified by:
        channelRead in interface
        channelRead in class
      • write

        public void write​( ctx,
                          Object msg,
                   throws Exception
        Specified by:
        write in interface
        write in class