Пример #1
0
        public HttpResponseMessage RavenRoot()
        {
            var location = DatabasesLandlord.SystemConfiguration.VirtualDirectory != "/"
                                ? DatabasesLandlord.SystemConfiguration.VirtualDirectory + "/" + RootPath : RootPath;

            var result = InnerRequest.CreateResponse(HttpStatusCode.Found);

            result.Headers.Location = new Uri(location, UriKind.Relative);

            return(result);
        }
Пример #2
0
        public HttpResponseMessage GetStudioFile(string path = null)
        {
            if (string.IsNullOrEmpty(Database.Configuration.RedirectStudioUrl) == false)
            {
                var result = InnerRequest.CreateResponse(HttpStatusCode.Found);
                result.Headers.Location = new Uri(Path.Combine(DatabasesLandlord.SystemConfiguration.ServerUrl, Database.Configuration.RedirectStudioUrl));
                return(result);
            }

            var docPath = GetRequestUrl().Replace("/studio/", "");

            return(WriteEmbeddedFile("~/Server/Html5Studio", "Raven.Database.Server.Html5Studio", "Raven.Studio.Html5", docPath));
        }
Пример #3
0
        public HttpResponseMessage RavenUiGet(string id = null)
        {
            if (string.IsNullOrEmpty(Database.Configuration.Server.RedirectStudioUrl) == false)
            {
                var result = InnerRequest.CreateResponse(HttpStatusCode.Found);
                result.Headers.Location = new Uri(Path.Combine(DatabasesLandlord.SystemConfiguration.ServerUrl, Database.Configuration.Server.RedirectStudioUrl));
                return(result);
            }

            var docPath = GetRequestUrl().Replace("/raven/", "");

            return(WriteEmbeddedFile(DatabasesLandlord.SystemConfiguration.Core.WebDir, "Raven.Database.Server.WebUI", null, docPath));
        }