
Research
/Security News
Critical Vulnerability in NestJS Devtools: Localhost RCE via Sandbox Escape
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
@deepkit/angular-ssr
Advanced tools
app.ts
and configure it in your angular.json
:In src/server/app.ts
:
import { App } from '@deepkit/app';
import { FrameworkModule } from '@deepkit/framework';
import { AngularModule, RequestHandler } from '@deepkit/angular-ssr';
const app = new App({
controllers: [
// your controllers
],
providers: [
// your providers
],
imports: [
new FrameworkModule({}),
new AngularModule({
moduleUrl: import.meta.url,
})
]
});
const main = isMainModule(import.meta.url);
if (main) {
void app.run(); //allows to call all CLI commands, including server:start
}
export const reqHandler = main
//when in main, we don't want to create a new request handler
? () => undefined
: app.get(RequestHandler).create();
{
"builder": "@angular-devkit/build-angular:application",
"options": {
"outputPath": "dist/app",
"index": "src/index.html",
"server": "src/main.server.ts",
"outputMode": "server",
"ssr": {
"entry": "src/server/app.ts"
},
"browser": "src/main.ts"
}
}
Make sure to have src/server/app.ts
also in your tsconfig.
In app/app.config.ts
(client side):
@Injectable()
export class APIInterceptor implements HttpInterceptor {
constructor(@Inject('baseUrl') @Optional() private baseUrl: string) {
// In client build, `baseUrl` is empty and should be inferred from the current location.
// If this is not correct, you can simply define the `baseUrl` in the `providers` array of the `appConfig` object.
this.baseUrl = baseUrl || (typeof location !== 'undefined' ? location.origin : '');
}
intercept(req: HttpRequest<any>, next: HttpHandler): Observable<HttpEvent<any>> {
const apiReq = req.clone({ url: `${this.baseUrl}/${req.url}` });
return next.handle(apiReq);
}
}
export const appConfig: ApplicationConfig = {
providers: [
{
provide: HTTP_INTERCEPTORS,
useClass: APIInterceptor,
multi: true,
},
// your other providers
],
};
In app/app.server.config.ts
(server side):
import { appConfig } from './app.config';
const serverConfig: ApplicationConfig = {
providers: [
provideServerRendering(),
provideServerRouting([
{
path: '**',
renderMode: RenderMode.Server,
},
]),
{
provide: HTTP_TRANSFER_CACHE_ORIGIN_MAP,
deps: [REQUEST_CONTEXT],
useFactory(context: any) {
return { [context?.baseUrl]: context?.publicBaseUrl || '' };
},
},
{
provide: 'baseUrl',
deps: [REQUEST_CONTEXT],
useFactory: (context: any) => {
return context?.baseUrl || '';
},
}
],
};
export const config = mergeApplicationConfig(appConfig, serverConfig);
1.0.8 (2025-05-20)
// old
logger.enableDebugScope('database')
//new
logger.setScopeLevel('database', LoggerLevel.debug);
// old
logger.disableDebugScope('database')
//new
logger.setScopeLevel('database', LoggerLevel.info);
FAQs
Deepkit + angular SSR
The npm package @deepkit/angular-ssr receives a total of 1 weekly downloads. As such, @deepkit/angular-ssr popularity was classified as not popular.
We found that @deepkit/angular-ssr demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
/Security News
A flawed sandbox in @nestjs/devtools-integration lets attackers run code on your machine via CSRF, leading to full Remote Code Execution (RCE).
Product
Customize license detection with Socket’s new license overlays: gain control, reduce noise, and handle edge cases with precision.
Product
Socket now supports Rust and Cargo, offering package search for all users and experimental SBOM generation for enterprise projects.