Skip to content

Commit

Permalink
Merge pull request #7 from isdi-coders-2023/feature/cors
Browse files Browse the repository at this point in the history
add cors origin configuration
  • Loading branch information
marcosparajua authored May 19, 2024
2 parents 6bc15b9 + e0a678d commit c11b90d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,12 @@ export const startApp = (app: Express, prisma: PrismaClient) => {
debug('Starting app');
app.use(express.json());
app.use(morgan('dev'));
app.use(cors());
app.use(
cors({
origin: 'https://hyph4e.netlify.app/',
credentials: true,
})
);
app.use(express.static('public'));

const authInterceptor = new AuthInterceptor();
Expand Down

0 comments on commit c11b90d

Please sign in to comment.