@Override
    public void removeFrom(HttpServletRequest request, HttpServletResponse response) {
        String name = getName();
        String value = DELETED_COOKIE_VALUE;
        //don't need to add extra size to the response - comments are irrelevant for deletions
        String comment = null;
        String domain = getDomain();
        String path = calculatePath(request);
        //always zero for deletion
        int maxAge = 0;
        int version = getVersion();
        boolean secure = isSecure();
        //no need to add the extra text, plus the value 'deleteMe' is not sensitive at all
        boolean httpOnly = false;
        SameSiteOptions sameSite = getSameSite();

        addCookieHeader(response, name, value, null, domain, path, maxAge, version, secure, httpOnly, sameSite);

        LOGGER.trace("Removed '{}' cookie by setting maxAge=0", name);
    }
Formats a date into a cookie date compatible string (Netscape's specification).

@param date the date to format
@return an HTTP 1.0/1.1 Cookie compatible date string (GMT-based).
web/src/main/java/org/apache/shiro/web/servlet/SimpleCookie.java