@Override
    public HttpResponse serve(ServiceRequestContext ctx, HttpRequest req) throws Exception {
        String location = locationFunction.apply(ctx);
        requireNonNull(location, "locationFunction returned null.");

        if (preserveQueryString) {
            location = appendQueryString(ctx, location);
        }

        return HttpResponse.of(ResponseHeaders.of(httpStatus,
                                                  HttpHeaderNames.LOCATION, location));
    }
NB: For now we redirect all methods.
core/src/main/java/com/linecorp/armeria/server/RedirectService.java