Revert "fix: prevent page reload on run trigger to open remote browser"

This commit is contained in:
Karishma Shukla
2025-01-24 19:28:04 +05:30
committed by GitHub
parent 85b4786062
commit 153cf81edc
5 changed files with 9 additions and 102 deletions

View File

@@ -16,7 +16,6 @@ import stealthPlugin from 'puppeteer-extra-plugin-stealth';
import logger from "../logger";
import { getDecryptedProxyConfig } from './proxy';
import { requireSignIn } from '../middlewares/auth';
import { browserPool } from '../server';
export const router = Router();
chromium.use(stealthPlugin());
@@ -34,17 +33,6 @@ router.all('/', requireSignIn, (req, res, next) => {
next() // pass control to the next handler
})
router.use('/', requireSignIn, (req: AuthenticatedRequest, res: Response, next) => {
if (browserPool.hasActiveRobotRun()) {
logger.log('debug', 'Preventing browser initialization - robot run in progress');
return res.status(403).json({
error: 'Cannot initialize recording browser while a robot run is in progress'
});
}
next();
});
/**
* GET endpoint for starting the remote browser recording session.
* returns session's id