We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bb07181 commit 1dfbb6aCopy full SHA for 1dfbb6a
1 file changed
src/main/java/tk/fungy/wsformc/WebServer.java
@@ -108,6 +108,11 @@ public void start() {
108
@Override
109
public Response serve(IHTTPSession session) {
110
String uri = session.getUri().toLowerCase();
111
+ String hostHeader = session.getHeaders().get("host");
112
+ if (hostHeader == null || !hostHeader.contains(domain + ":" + port)) {
113
+ return newFixedLengthResponse(Response.Status.BAD_REQUEST, "text/plain", "DNS_PROBE_POSSIBLE");
114
+ }
115
+
116
117
if (uri.endsWith("/")) {
118
uri = "/index.html";
0 commit comments