Revert auth change

as pointed out here: 54188d7c31 (r139420374)
This commit is contained in:
Jonas_Jones 2024-03-06 13:57:37 +01:00
parent 54188d7c31
commit 0a71b04b66

View file

@ -123,8 +123,8 @@ public class HttpServer implements Runnable {
while ((header = in.readLine()) != null && !header.isEmpty()) {
// Check if the header contains your API token
if (header.startsWith("Authorization: Basic ")) {
apiToken = header.substring("Authorization: Basic ".length());
if (header.startsWith("Authorization: Bearer ")) {
apiToken = header.substring("Authorization: Bearer ".length());
}
}
@ -350,6 +350,10 @@ public class HttpServer implements Runnable {
}
}
/*private BufferedOutputStream responseConstructor(BufferedOutputStream dataOut, String content, String mimeType) {
dataOut.write()
}*/
private byte[] readFileData(Path file) throws IOException {
return Files.readAllBytes(file);
}