ZPM, REST, RedirectEmptyPath
In the settings of the IRIS web application configuration page there is an option "Redirect empty path" which allows a user to access REST endpoint URL without trailing slash, eg. /csp/api/rest
instead of /csp/api/rest/
. How could I change this option declaratively in my ZPM manifest?
Product version: IRIS 2023.1
This property is missing in ZPM, and probably some more
Could you raise an issue in the repo about it
Thanks, got it. Then perhaps this setting can somehow be changed programmatically, in the installer code?
Hi Dmitrii,
Thanks for this question.
Programmatically you can use the method Security.Applications:Modify() (from within the %SYS namespace).
Here's an example:
set props("RedirectEmptyPath")=1 set status = ##class(Security.Applications).Modify("/myapp/name",.props)
This article by @David Hockenbroch covers this Security Applications API (including reference to this setting) in general.
Thanks Dimitrii, your question answered my question (how to get rid of the trailing slash).