revert revert feat(auth): bearer token desteği ve çoklu origin ayarı ekle

revert feat(auth): bearer token desteği ve çoklu origin ayarı ekle

- Authorization header ile Bearer token kimlik doğrulaması eklendi
- Token'ların localStorage'da saklanması desteği eklendi
- WEB_ALLOWED_ORIGINS ve WEB_ALLOWED_HOSTS konfigürasyonları eklendi
- Loop işlerinde profileId ve profileName alanları eklendi
- CORS ve Vite sunucusu için çoklu origin desteği sağlandı
This commit is contained in:
2026-01-05 17:34:03 +00:00
parent cdffa46a5b
commit 8bf4b10af3
14 changed files with 18 additions and 85 deletions

View File

@@ -27,8 +27,6 @@ export const createLoopJob = async (
allowIp: string;
targetLoops: number;
delayMs: number;
profileName?: string;
profileId?: string;
}
): Promise<LoopJob> => {
const now = nowIso();
@@ -43,8 +41,6 @@ export const createLoopJob = async (
targetLoops: input.targetLoops,
doneLoops: 0,
delayMs: input.delayMs,
profileName: input.profileName,
profileId: input.profileId,
deleteDataBetweenLoops: true,
enforcementMode: "aggressive-soft",
status: "RUNNING",

View File

@@ -18,7 +18,7 @@ router.post("/start", async (req, res) => {
if (!parsed.success) {
return res.status(400).json({ error: parsed.error.flatten() });
}
const { hash, allowIp, targetLoops, delayMs, profileName, profileId } = parsed.data;
const { hash, allowIp, targetLoops, delayMs } = parsed.data;
const db = await readDb();
if (targetLoops > db.settings.maxLoopLimit) {
return res.status(400).json({ error: "Target loops exceed max limit" });
@@ -64,8 +64,6 @@ router.post("/start", async (req, res) => {
allowIp,
targetLoops,
delayMs,
profileName,
profileId,
});
res.json(job);
});