fix(stage): isolate credentialless author bootstrap and recovery rehearsal
Stage author bootstrap (dedicated repair) / bootstrap (push) Failing after 3m55s

This commit is contained in:
Canina Automation committed 2026-10-28 19:52:55 +00:00
1 parent 6ed0e73311
commit 46da1c5339
30 files changed
+1295 -62

No files matched your search

+6 -1
View File
@@ -10,6 +10,7 @@ import {
Req,
UseGuards,
BadRequestException,
ForbiddenException,
} from "@nestjs/common";
import { AdminService, CouponInput } from "./admin.service";
import { ProductDto } from "./dto/product.dto";
@@ -80,7 +81,11 @@ export class AdminController {
summary:
"بازیابی شناسه و مشخصات عمومی پنج نویسنده اورجینال مقالات در محیط استیج",
})
async restoreStageAuthors() {
async restoreStageAuthors(@Req() req: { socket?: { remoteAddress?: string } }) {
const peer = req?.socket?.remoteAddress;
if (!peer || !["127.0.0.1", "::1", "::ffff:127.0.0.1"].includes(peer)) {
throw new ForbiddenException("Stage author restoration requires a loopback socket");
}
if (!this.stageAuthorRestorationService) {
throw new Error("StageAuthorRestorationService not initialized");
}