Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7811983
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T04:21:55+00:00 2026-06-02T04:21:55+00:00

I am pulling a json file from my project and then writing it as

  • 0

I am pulling a json file from my project and then writing it as a static file in a javascript directory like so:

json_file_path = Rails.root.join("data", "infographics.json")
json_object = JSON.parse(open("http://url/api/infographics/all").read)
File.open(json_file_path, 'w') {|f| f.write(json_object.to_json) }

But when I go to read this file from my dev machine to the remote server I get an error of:

Origin http://0.0.0.0:3000 is not allowed by Access-Control-Allow-Origin.

Is this an apache setting or am I not setting my header correctly when I write it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T04:21:57+00:00Added an answer on June 2, 2026 at 4:21 am

    You could set the Access-Control-Allow-Origin header like this:

    Header set Access-Control-Allow-Origin *

    in <Directory>, <Location>, <Files>, <VirtualHost> or .htaccess

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm pulling in JSON from an external URL. I then want to use that
I'm unsingf RestKit in my iPad Project pulling some JSON Data from Server. The
I am pulling in data from a JSON file using FBJS AJAX. On of
I'm pulling JSON from Instagram: $instagrams = json_decode($response)->data; Then parsing variables into a PHP
I need help displaying this image which I'm pulling from a JSON server. JSON
I have the following json content that I'm pulling from a different location: JSON
I'm pulling some info from a database then putting it into a DIV and
I am pulling data from a json and decoding it via json_decode. Here is
I have a few NSManagedObject classes. I am pulling down some JSON data from
I am pulling my data from a database and I am using json. What

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.