Loading TOC...

MarkLogic Server 11.0 Product Documentation
xdmp.requestForwarded

xdmp.requestForwarded() as Boolean

Summary

Returns true if the current HTTP or XDBC request was forwarded via a proxy or load balancer, as indicated by the presence of an X-Forwarded-For HTTP header (case-insensitive). Returns false if no such header is present, or if the function is not called from an HTTP or XDBC request context.

Example

xdmp.requestForwarded();
=> true (if an X-Forwarded-For header was present on the request)

Stack Overflow iconStack Overflow: Get the most useful answers to questions from the MarkLogic community, or ask your own question.