The micro-VM for AI agents — light enough to embed on your laptop, elastic enough to power an agentic cloud.
/*
* Copyright 2025 Daytona Platforms Inc.
* Modified by BoxLite AI, 2025-2026
* SPDX-License-Identifier: AGPL-3.0
*/
import { Injectable, ExecutionContext, Logger, CanActivate } from '@nestjs/common'
import { getAuthContext } from '../../auth/get-auth-context'
import { isProxyContext } from '../../common/interfaces/proxy-context.interface'
@Injectable()
export class ProxyGuard implements CanActivate {
protected readonly logger = new Logger(ProxyGuard.name)
async canActivate(context: ExecutionContext): Promise<boolean> {
// Throws if not proxy context
getAuthContext(context, isProxyContext)
return true
}
}