Magic strings in headless forms

Hi.

I am working on a headless/ajax version of Umbraco Forms, and now I am testing magic strings. The data I get when using these differs from what the standard Umbraco Forms element outputs, however.

E.g., I have added [@url] as a default value to a field. The value in the headless version is “https://[localhost]/umbraco/forms/delivery/api/v1/definitions/1072c851-e4e8-43e7-bd44-64ec82b06c29”. This is of course the URL that returns the form data.

I also tried using [#pageName]. Works as intended in the SSR module, but returns nothing in the headless version.

Maybe it is obvious to someone why this doesn’t work, but based on the documentation for magic strings I don’t see why it shouldn’t. Unless HttpContext.Request is different in this context.