function createRedirectResponse(uri, querystring, statusCode) {
    const location = querystring ? `${uri}?${querystring}` : uri;
    const status = statusCode.toString();
    const statusDescription = http.STATUS_CODES[status];
    const refresh = statusCode === 308
        ? [
            // Required for IE11 compatibility
            {
                key: "Refresh",
                value: `0;url=${location}`
            }
        ]
        : [];
    return {
        status: status,
        statusDescription: statusDescription,
        headers: {
            location: [
                {
                    key: "Location",
                    value: location
                }
            ],
            refresh: refresh
        }
    };
}
/**
 * Create a redirect response with the given status code for CloudFront.
 * @param uri
 * @param querystring
 * @param statusCode
 */
Create a redirect response with the given status code for CloudFront.
Create a redirect response with the given status code for CloudFront .
function createRedirectResponse(uri, querystring, statusCode) {
    const location = querystring ? `${uri}?${querystring}` : uri;
    const status = statusCode.toString();
    const statusDescription = http.STATUS_CODES[status];
    const refresh = statusCode === 308
        ? [
            {
                key: "Refresh",
                value: `0;url=${location}`
            }
        ]
        : [];
    return {
        status: status,
        statusDescription: statusDescription,
        headers: {
            location: [
                {
                    key: "Location",
                    value: location
                }
            ],
            refresh: refresh
        }
    };
}
function createRedirectResponse ( uri , querystring , statusCode ) { const location = querystring ? ` ${ uri } ${ querystring } ` : uri ; const status = statusCode . toString ( ) ; const statusDescription = http . STATUS_CODES [ status ] ; const refresh = statusCode === 308 ? [ { key : "Refresh" , value : ` ${ location } ` } ] : [ ] ; return { status : status , statusDescription : statusDescription , headers : { location : [ { key : "Location" , value : location } ] , refresh : refresh } } ; }
Create a redirect response with the given status code for CloudFront.
Create a redirect response with the given status code for CloudFront .
// Required for IE11 compatibility
