类 CorsRegistry

    • 方法详细资料

      • addMapping

        public CorsRegistration addMapping​(String pathPattern)
        Enable cross-origin request handling for the specified path pattern.

        Exact path mapping URIs (such as "/admin") are supported as well as Ant-style path patterns (such as "/admin/**").

        By default, all origins, all headers, credentials and GET, HEAD, and POST methods are allowed, and the max age is set to 30 minutes.

        参数:
        pathPattern - the path pattern to enable CORS handling for
        返回:
        CorsRegistration the corresponding registration object, allowing for further fine-tuning