Rainy.CustomHandler.FilesystemHandler.CheckAndProcess C# (CSharp) Method

CheckAndProcess() public method

public CheckAndProcess ( IHttpRequest request ) : IHttpHandler
request IHttpRequest
return IHttpHandler
        public IHttpHandler CheckAndProcess(IHttpRequest request)
        {
            if (!active)
                return null;

            string abs_path = request.GetAbsolutePath();

            if (this.HtdocsPath.Contains ("swagger-ui")) {

                if (abs_path.StartsWith ("/swagger-ui/")) {
                    return this;
                }
            }
            if (abs_path.StartsWith ("/fonts/")) {
                return this;
            }
            if (abs_path.StartsWith ("/resource")) {
                return null;
            }

            if (abs_path.StartsWith ("/oauth/") || abs_path.StartsWith ("/api/")) {
                return null;
            } else if (abs_path.StartsWith ("/admin/")) {
                return this;
            } else if (abs_path.Count (c => c == '/') == 1) {
                return this;
            } else {
                return null;
            }

            /*
            // TODO case insensitive on option
            if (abs_path.StartsWith(RoutePath) && is_html_request)
                // we want to handle this url path
                return this;
            else
                return null;
            */
        }