Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

209
Views
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
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!