From fedf8cab183668c497ff823274467da73ff9925d Mon Sep 17 00:00:00 2001 From: Ryan Semerau Date: Mon, 1 Jun 2015 16:52:40 -0400 Subject: [PATCH] url rewriter for rest app is overridable and uses .xml by default for ml8 --- deploy/lib/server_config.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/deploy/lib/server_config.rb b/deploy/lib/server_config.rb index 6e4ca4d1..68eac185 100644 --- a/deploy/lib/server_config.rb +++ b/deploy/lib/server_config.rb @@ -2106,6 +2106,15 @@ def build_config(config_file) rest_auth_method = conditional_prop('ml.rest-authentication-method', 'ml.authentication-method') rest_default_user = conditional_prop('ml.rest-default-user', 'ml.default-user') + rest_url_rewriter = nil + if @properties['ml.rest-url-rewriter'].present? + rest_url_rewriter = @properties['ml.rest-url-rewriter'] + elsif @server_version > 7 + rest_url_rewriter = '/MarkLogic/rest-api/rewriter.xml' + else + rest_url_rewriter = '/MarkLogic/rest-api/rewriter.xqy' + end + config.gsub!("@ml.rest-appserver", %Q{ @@ -2115,7 +2124,7 @@ def build_config(config_file) #{rest_auth_method} - /MarkLogic/rest-api/rewriter.xqy + #{rest_url_rewriter} /MarkLogic/rest-api/error-handler.xqy true