From 16e8262300c5c3a1cbb43fde6000efffb43c638c Mon Sep 17 00:00:00 2001 From: Ryan Semerau Date: Mon, 1 Jun 2015 15:35:51 -0400 Subject: [PATCH 1/2] fixed property name for getting rest modules db --- deploy/lib/server_config.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/deploy/lib/server_config.rb b/deploy/lib/server_config.rb index ed46d4a0..6e4ca4d1 100644 --- a/deploy/lib/server_config.rb +++ b/deploy/lib/server_config.rb @@ -1534,7 +1534,7 @@ def deploy_rest # Figure out where we need to deploy this stuff rest_modules_db = '' if @properties.has_key?('ml.rest-port') and @properties['ml.rest-port'] != '' - rest_modules_db = "#{@properties['ml.app-name']}-rest-modules" + rest_modules_db = "#{@properties['ml.app-name-rest-modules']}" else rest_modules_db = @properties['ml.modules-db'] end From fedf8cab183668c497ff823274467da73ff9925d Mon Sep 17 00:00:00 2001 From: Ryan Semerau Date: Mon, 1 Jun 2015 16:52:40 -0400 Subject: [PATCH 2/2] 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