Kkula
Dear all,
is there anywhere an open source example or tutorial how to setup CORS correctly for an IE App using an Angular UI with a NEST backend?
Best regards,
Dieter
Dear Dieter,
While a single, complete open-source tutorial combining all elements (IE-specific, Angular, NestJS, CORS) is rare, here’s a breakdown and resources to guide you. IE's CORS implementation is stricter than modern browsers – this is key.
@nestjs/common package for CORS. Ensure you're correctly setting allowed origins, methods, and credentials.
import { Module } from '@nestjs/common';
import { ConfigModule } from '@nestjs/config';
import { CorsModule } from '@nestjs/platform-express';
@Module({
imports: [
ConfigModule.forRoot(),
CorsModule.forRoot({
origin: 'your-angular-app-origin', // Replace with your Angular app's origin
methods: ['GET', 'POST', 'PUT', 'DELETE', 'OPTIONS'],
allowedHeaders: ['Content-Type', 'Authorization'],
credentials: true, // If you need cookies
}),
],
})
export class AppModule {}
Important: Thoroughly test with IE's developer tools (F12) to inspect network requests and responses. Pay close attention to the OPTIONS request and any error messages.
Best regards,
Siemens Self Support (Integrated with SiePortal)
Our flexible community website is a platform that allows users to connect, share information, and collaborate on various topics of interest. The website offers a range of features such as discussion forums, messaging, user profiles, event calendars, and more. Users can customize their experience by creating and joining different groups or communities based on their interests or location. The website is designed to be user-friendly and adaptable to the needs and preferences of our diverse user base. Whether you are looking to network professionally, share hobbies and interests, or simply connect with like-minded individuals, our flexible community website has something for everyone. Join us today and become a part of our thriving online community!
India
Copyright ©2026
Share this page with your family and friends.