com.vtence.molecule.middlewares.ServerHeader Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of molecule Show documentation
Show all versions of molecule Show documentation
A web micro-framework for Java
package com.vtence.molecule.middlewares;
import com.vtence.molecule.Request;
import com.vtence.molecule.Response;
public class ServerHeader extends AbstractMiddleware {
private final String serverName;
public ServerHeader(String serverName) {
this.serverName = serverName;
}
public void handle(Request request, Response response) throws Exception {
response.header("Server", serverName);
forward(request, response);
}
}