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,6 +7,8 @@ import 'reflect-metadata';
77 */
88import '@angular/localize/init' ;
99
10+ import { setDefaultResultOrder } from 'node:dns' ;
11+
1012import {
1113 bootstrapApplication ,
1214 BootstrapContext ,
@@ -15,6 +17,12 @@ import {
1517import { AppComponent } from './app/app.component' ;
1618import { serverAppConfig } from './modules/app/server-app.config' ;
1719
20+ // Apply DNS resolution order fix for Node.js 17+ by preferring IPv4 over IPv6.
21+ // This fixes "ECONNREFUSED ::1:8080" errors in PM2 cluster mode when
22+ // the backend only listens on IPv4
23+ // See https://github.com/DSpace/dspace-angular/issues/4960
24+ setDefaultResultOrder ( 'ipv4first' ) ;
25+
1826const bootstrap = ( context : BootstrapContext ) => bootstrapApplication ( AppComponent , serverAppConfig , context ) ;
1927
2028export default bootstrap ;
You can’t perform that action at this time.
0 commit comments