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

213
Vistas
In a browser, is it possible to safely get a JSON resource from an external URL provided by the user?

I want to let users open my web app through a link that already contains the URL to the external resource. Then the web app needs to fetch this external resource and render content on the page based off of it.

This feature is important to me in order to allow users to integrate my app with their app or their own datasource.

Assuming my web app is hosted at example.com, a user needs to be able to open a link such as

https://example.com/view?resource=https%3A%2F%2Fexternal-hosting.net%2Ffile%2F24345

then based on this my code will

const data = await fetch('https://external-hosting.net/file/24345')
const dataJSON = await data.json()

Is it possible to safely retrieve such JSON data directly in the browser, if there's no way to make sure that the URL can be trusted?

What security vulnerabilities does this introduce and can they be mitigated?

about 4 years ago · Juan Pablo Isaza
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