diff --git a/backend/server.js b/backend/server.js index 55d1d14..e28bcff 100644 --- a/backend/server.js +++ b/backend/server.js @@ -14,17 +14,9 @@ import { import { generateToken, authenticate } from "./services/tokenService.js"; env.config(); const app = express(); -const port = 8002; +const port = 8502; -app.use( - cors({ - origin: ["https://backend.lose.the1s.de", "https://lose.the1s.de"], - credentials: true, - methods: ["GET", "POST", "PUT", "DELETE", "OPTIONS"], - allowedHeaders: ["Content-Type", "Authorization"], - }) -); -app.options("*", cors()); +app.use(cors()); // Increase body size limits to support large CSV JSON payloads app.use(express.urlencoded({ extended: true, limit: "10mb" })); app.set("view engine", "ejs"); @@ -43,8 +35,6 @@ app.post("/lose", async (req, res) => { } }); -// !!!!!!! AUTHORISATION HINZUFÜGEN - DENN GEHT NICHT !!!!!!!! - app.get("/table-data", authenticate, async (req, res) => { const result = await getTableData(); if (result.success && result.data) {