File tree Expand file tree Collapse file tree 1 file changed +8
-0
lines changed
Expand file tree Collapse file tree 1 file changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -7,11 +7,19 @@ import 'reflect-metadata';
77 */
88import '@angular/localize/init' ;
99
10+ import { setDefaultResultOrder } from 'node:dns' ;
11+
1012import { bootstrapApplication } from '@angular/platform-browser' ;
1113
1214import { AppComponent } from './app/app.component' ;
1315import { serverAppConfig } from './modules/app/server-app.config' ;
1416
17+ // Apply DNS resolution order fix for Node.js 17+ by preferring IPv4 over IPv6.
18+ // This fixes "ECONNREFUSED ::1:8080" errors in PM2 cluster mode when
19+ // the backend only listens on IPv4
20+ // See https://github.com/DSpace/dspace-angular/issues/4960
21+ setDefaultResultOrder ( 'ipv4first' ) ;
22+
1523const bootstrap = ( ) => bootstrapApplication ( AppComponent , serverAppConfig ) ;
1624
1725export default bootstrap ;
You can’t perform that action at this time.
0 commit comments