interface UrlBuilderArgs {
    cookieValueAsParam?: string[];
    location: RouteLocationInterface;
    options: {
        restNamespace: string;
        restNonce?: string;
        restPathObfuscateOffset?: string;
        restQuery?: object;
        restRecreateNonceEndpoint?: string;
        restRoot: string;
    };
    params?: IRouteParamsInterface;
}

Properties

cookieValueAsParam?: string[]

When your GET endpoint depends on a cookie value and you are using a page cache like NGINX together with Redis, you could run into caching issues. Why? NGINX mostly uses the query parameters as cache key and also hits the cache even the cookie values changed. Two possible solutions are either to switch to a non-GET verb or using this property. This allows you to define a list of cookie keys which should be sent as _httpCookieInvalidate parameter and the cookie value hashed in simple way.

options: {
    restNamespace: string;
    restNonce?: string;
    restPathObfuscateOffset?: string;
    restQuery?: object;
    restRecreateNonceEndpoint?: string;
    restRoot: string;
}

Type declaration

  • restNamespace: string
  • Optional restNonce?: string
  • Optional restPathObfuscateOffset?: string
  • Optional restQuery?: object
  • Optional restRecreateNonceEndpoint?: string
  • restRoot: string
params?: IRouteParamsInterface