MCPcopy
hub / github.com/nestjs/nest / applyOptions

Method applyOptions

packages/core/nest-application.ts:123–133  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

121 }
122
123 public applyOptions() {
124 if (!this.appOptions || !this.appOptions.cors) {
125 return undefined;
126 }
127 const passCustomOptions =
128 isObject(this.appOptions.cors) || isFunction(this.appOptions.cors);
129 if (!passCustomOptions) {
130 return this.enableCors();
131 }
132 return this.enableCors(this.appOptions.cors);
133 }
134
135 public createServer<T = any>(): T {
136 this.httpAdapter.initHttpServer(this.appOptions);

Callers 1

initMethod · 0.95

Calls 3

enableCorsMethod · 0.95
isObjectFunction · 0.90
isFunctionFunction · 0.90

Tested by

no test coverage detected