Skip to content

. / Rubber Chickin

® A Modest Larger-Than-Life Tech Blog™, inc.

  • News
  • How To’s
  • Books List
  • About
  • Contact

json

August 27, 2019August 27, 2019

CORS error when reading remote .json file

The easy fix to allow your Web App to read remote json files from the server is to create the .htaccess file.

Create an `.htaccess` file and place it in the directory of the json files.

<Files "*.json">
  Header set Access-Control-Allow-Origin "*"
</Files>

Simply reload your app and it should work! good luck!

Categories Angular, IonicCategories angular, Apache, Cors, http, ionic, json, php, policy

About

A blog about tech, coding, entertainment, and other random ramblings.

Follow @rubber_chickin




Recent Posts

  • How to Customize Ionic Slides Pager in CSS
  • How to Open PDF/File in Ionic on Android
  • How To Create Downloadable CSV File in JS/Angular
  • How Much Access Does Facebook App Have?
  • How To Batch commands in .bat file on Windows
  • Google Android Play Store Target API Requirement Change
  • How To Find Valid Email Address in JavaScript Regex
  • Can you run GTX 1050 TI on 220W Power Supply?
  • How to Set proper Rules on Google Firebase DB
  • How to iterate over dictionary/map items in JavaScript
  • How to Implement Binary Search in JavaScript
  • How to Implement Merge Sort in JavaScript



Rubber Chickin, 2019.