fixed apiKey
This commit is contained in:
parent
6d0a22a314
commit
328e2b9916
@ -14,7 +14,7 @@ import java.util.List;
|
||||
public class HttpServerApp {
|
||||
|
||||
// ✅ Statický API klíč
|
||||
private static final String API_KEY = "JustSomeRandomText";
|
||||
private static final String API_KEY = "6666-1234";
|
||||
|
||||
public static void main(String[] args) throws Exception {
|
||||
TransmissionService service = new TransmissionService();
|
||||
@ -82,6 +82,7 @@ public class HttpServerApp {
|
||||
server.createContext("/", exchange -> {
|
||||
try {
|
||||
setCors(exchange);
|
||||
if (!checkApiKey(exchange)) return;
|
||||
String path = exchange.getRequestURI().getPath();
|
||||
if ("/".equals(path) || path.isEmpty() || path.equals("/index.html")) {
|
||||
String html = readResource("/index.html");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user