public RedirectConfigBuilder allowProtocols(Iterable<SessionProtocol> protocols) {
        requireNonNull(protocols, "protocols");
        for (SessionProtocol protocol : protocols) {
            if (!(protocol == SessionProtocol.HTTP || protocol == SessionProtocol.HTTPS)) {
                throw new IllegalArgumentException(
                        "protocol: " + protocol +
                        " (expected: " + SessionProtocol.HTTP + " or " + SessionProtocol.HTTPS + ')');
            }
        }
        allowedProtocols = ImmutableSet.copyOf(protocols);
        return this;
    }
Sets the {@link SessionProtocol}s that are allowed for automatic redirection.
Only {@link SessionProtocol#HTTP} and {@link SessionProtocol#HTTPS} can be set.

<p>When the allowed {@link SessionProtocol}s are not set, {@link SessionProtocol#HTTPS} is set
by default. If the {@link WebClient} is created <b>with</b> a base URI that has
{@link SessionProtocol#HTTP}, {@link SessionProtocol#HTTP} is also set.
core/src/main/java/com/linecorp/armeria/client/redirect/RedirectConfigBuilder.java