added: ipv4 based per locals
In compliance with Google OAuth factor by providing real ipv4 bound from localost machine Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -19,6 +19,16 @@
|
||||
***********************************************************************************************************************************************************************/
|
||||
require('dotenv').config();
|
||||
|
||||
// Force IPv4-only outbound connections. Hosts that resolve AAAA records but
|
||||
// have no working IPv6 route (e.g. to Google's OAuth endpoints) hit ENETUNREACH
|
||||
// on the v6 attempt — and Node's dual-stack "Happy Eyeballs" connector
|
||||
// (autoSelectFamily) throws AggregateError instead of falling back cleanly to
|
||||
// the reachable IPv4 address. dns.setDefaultResultOrder alone does NOT fix
|
||||
// this (the connector still races both families); autoSelectFamily has to be
|
||||
// disabled outright. See [AUTH] googleCallback OIDC error: AxiosError [AggregateError].
|
||||
require('net').setDefaultAutoSelectFamily(false);
|
||||
require('dns').setDefaultResultOrder('ipv4first');
|
||||
|
||||
const express = require('express');
|
||||
const cors = require('cors');
|
||||
const cookieParser = require('cookie-parser');
|
||||
|
||||
Reference in New Issue
Block a user