How to rewrite the request url of the api using resource type in the publisher ?
Hello everyone,
I have an api using Sling Resource Type that return the response in XML format.
I can call the API with the author IP and return the response in XML format:
For example url :
- {{ author IP }}/content/projectName/en/pageName/optionalSubPageName.selector.xml?param=abc
It returned the response in XML format
==> CORRECT as expected.
However, when I call the api with the PUBLISH IP OR PUBLISH DOMAIN such as:
- {{ publish IP }}/content/projectName/en/pageName/optionalSubPageName.selector.xml?param=abc
- {{ publish domain }}/pageName/optionalSubPageName.selector.xml?param=abc
It will automatically direct to the PAGE at the path "pageName" or "optionalSubPageName" instead of the response XML format.
Note: the {{ publish IP }} will automatically rewritten to {{ publish domain }} when it was called.
==> NOT CORRECT as expected.
My expectation: I can call the api and return the response in XML format with the request url as:
- {{ publish domain }}/pageName/optionalSubPageName.selector.xml?param=abc
Do you have any suggestion or is there any solution for this one ?
I don't have much experience with this situation.
P/s: the project is running by AEM CLOUD Service and on Adobe server. So it seems I cannot visit /system/console page.
Thank you in advance.