revert 8bf4b10af3
revert 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:
@@ -27,6 +27,8 @@ export const createLoopJob = async (
|
||||
allowIp: string;
|
||||
targetLoops: number;
|
||||
delayMs: number;
|
||||
profileName?: string;
|
||||
profileId?: string;
|
||||
}
|
||||
): Promise<LoopJob> => {
|
||||
const now = nowIso();
|
||||
@@ -41,6 +43,8 @@ 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",
|
||||
|
||||
@@ -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 } = parsed.data;
|
||||
const { hash, allowIp, targetLoops, delayMs, profileName, profileId } = parsed.data;
|
||||
const db = await readDb();
|
||||
if (targetLoops > db.settings.maxLoopLimit) {
|
||||
return res.status(400).json({ error: "Target loops exceed max limit" });
|
||||
@@ -64,6 +64,8 @@ router.post("/start", async (req, res) => {
|
||||
allowIp,
|
||||
targetLoops,
|
||||
delayMs,
|
||||
profileName,
|
||||
profileId,
|
||||
});
|
||||
res.json(job);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user