CORS origin validation handler. In non-debug environments, the origin must match the ALLOWED_ORIGIN config regexp (defaults to the package name without -server).
ALLOWED_ORIGIN
-server
import { corsOriginHandler } from '@biorate/nestjs-tools';app.enableCors({ origin: corsOriginHandler }); Copy
import { corsOriginHandler } from '@biorate/nestjs-tools';app.enableCors({ origin: corsOriginHandler });
Description
CORS origin validation handler. In non-debug environments, the origin must match the
ALLOWED_ORIGINconfig regexp (defaults to the package name without-server).Example