Written by

UKK Köln
Question Dmitrii Baranov · Nov 21, 2023

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

Comments

Dmitry Maslennikov · Nov 21, 2023

This property is missing in ZPM, and probably some more

Could you raise an issue in the repo about it

0
Dmitrii Baranov  Nov 21, 2023 to Dmitry Maslennikov

Thanks, got it. Then perhaps this setting can somehow be changed programmatically, in the installer code?

0
Tani Frankel  Nov 22, 2023 to Dmitrii Baranov

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.

0
Otto Medin · Mar 25, 2024

Thanks Dimitrii, your question answered my question (how to get rid of the trailing slash).

0