fix(coding): remediate data service review findings
This commit is contained in:
@@ -156,8 +156,7 @@ function normalizeOrigin(value: string): string {
|
||||
|| hostname === '[::1]';
|
||||
if (
|
||||
!isLoopback
|
||||
|| parsed.protocol !== 'http:'
|
||||
|| !parsed.port
|
||||
|| (parsed.protocol !== 'http:' && parsed.protocol !== 'https:')
|
||||
|| parsed.username
|
||||
|| parsed.password
|
||||
|| parsed.pathname !== '/'
|
||||
@@ -402,6 +401,7 @@ export class PreviewDataSessionManager {
|
||||
handleAgentBrowserLifecycle(event: AgentBrowserLifecycleEvent): void {
|
||||
const session = this.session;
|
||||
if (!session || !samePath(session.snapshot.projectPath, event.projectPath)) return;
|
||||
if (event.generation !== session.snapshot.browserGeneration) return;
|
||||
switch (event.type) {
|
||||
case 'closed':
|
||||
this.invalidate('preview_closed');
|
||||
|
||||
Reference in New Issue
Block a user