Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

455
Vistas
how to configure nodejs to accept all request from outside of localhost?

I developed an application with NextJs then built it. I run it on node server using 'npm run start' at Powershell. it works fine on localhost on port 80, but my server does not accept any request from outside neither by domain name or IP address. how should I configure application or nodejs to accept all request ?
OS is windows server 2019

about 4 years ago · Juan Pablo Isaza
2 Respuestas
Responde la pregunta

0

You need to allow CORS

res.header('Access-Control-Allow-Origin', '*');
about 4 years ago · Juan Pablo Isaza Denunciar

0

Try to this cors npm module - https://www.npmjs.com/package/cors

var cors = require('cors');

var app = express();
app.use(cors());

It provides many features to configure cors setting including domain whitelisting, enabling cors for specific apis and many more.

about 4 years ago · Juan Pablo Isaza Denunciar
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda