Class CorsHandlerHelperImpl

    • Constructor Summary

      Constructors 
      Constructor Description
      CorsHandlerHelperImpl​(java.lang.String allowedOrigins, boolean allowCredentials, java.lang.String allowMethods, java.lang.String allowedHeaders, java.lang.String exposeHeaders, java.lang.String maxAge)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void configureAllowedHeaders​(javax.servlet.http.HttpServletResponse response, javax.servlet.http.HttpServletRequest request)
      Conditionally the Access-Control-Request-Headers HTTP header.
      void configureCredentials​(javax.servlet.http.HttpServletResponse response)
      Conditionally sets the Access-Control-Allow-Credentials HTTP header.
      void configureExposeHeaders​(javax.servlet.http.HttpServletResponse response)
      Conditionally sets the Access-Control-Expose-Headers HTTP header.
      void configureMaxAge​(javax.servlet.http.HttpServletResponse response)
      Conditionally sets the Access-Control-Max-Age HTTP header.
      void configureMethods​(javax.servlet.http.HttpServletResponse response)
      Conditionally sets the Access-Control-Allow-Methods HTTP header in responses to preflight CORS requests.
      void configureOrigin​(javax.servlet.http.HttpServletResponse response, java.lang.String value)
      Sets the Access-Control-Allow-Origin HTTP header with a given value.
      java.util.Optional<java.lang.String> getAllowedOrigin​(javax.servlet.http.HttpServletRequest request)
      Returns the origin of this requests, if it's allowed.
      java.util.Optional<java.lang.String> getOrigin​(javax.servlet.http.HttpServletRequest request)
      Returns the value of the Origin HTTP header.
      java.lang.String getPath​(javax.servlet.http.HttpServletRequest request)
      Returns the requested URL path, using the same logic as Request.getPath().
      boolean isPreflight​(javax.servlet.http.HttpServletRequest request)
      Tells whether this request is a CORS preflight one (i.e.
      • Methods inherited from class java.lang.Object

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