Class AllowedCrossDomainsHandler


  • public class AllowedCrossDomainsHandler
    extends Object
    Provides/handles the domain checkers which determine if a specific cross domain request is allowed on the OB server. https://en.wikipedia.org/wiki/Cross-origin_resource_sharing
    Author:
    Martin Taal
    • Constructor Detail

      • AllowedCrossDomainsHandler

        public AllowedCrossDomainsHandler()
    • Method Detail

      • isCheckedInvalidOrigin

        public boolean isCheckedInvalidOrigin​(javax.servlet.http.HttpServletRequest request)
        Checks if an origin is set on the header, if not then false is returned. If there are no checkers installed then also false is returned. If there are checkers installed then the origin is checked and the result is returned. Note: will return true if there is indeed an invalid confirmed origin.
      • setCORSHeaders

        public void setCORSHeaders​(javax.servlet.http.HttpServletRequest request,
                                   javax.servlet.http.HttpServletResponse response)
        Utility method to set CORS headers on a request.