gist JS

Thursday, September 11, 2014

CORS for Rails / Heroku & Cloudfront (for dummies)

So starting today all your fonts don't load. Because CORS.

No 'Access-Control-Allow-Origin' header is present on the requested resource.

Here's what to do.

1) Remember your CloudFront password.

2) Edit your behavior


3) Forwarding headers -> whitelist

4) Add "Origin"

5) Add rack-cors to Gemfile

gem 'rack-cors'

6) Add stuff to config.ru

require 'rack/cors'
use Rack::Cors do

  # allow all origins in development
  allow do
    origins '*'
    resource '*',
        :headers => :any,
        :methods => [:get, :post, :delete, :put, :options]

7) Deploy

8) Try to forget about CORS

Did that work? Why not try my tool ForceRank.it, a prioritization tool for product teams that lets you rank choices. It even lets you import a Trello board!


Unknown said...

This is excellent information. It is amazing and wonderful to visit your site.Thanks for sharing this information,this is useful to me...
Android Training in Chennai
Ios Training in Chennai

Karthik said...

It's very useful to read your article in this blog and very informative to develop my skills and for the career
iOS Training in Chennai
iOS Training Institute in Chennai
iOS Course in Chennai
mobile application development training in chennai
iOS Training

Kayal said...

Great work! Really I enjoy to read your content and very helpful for improving myself. Keep blogging...
Pega Training in Chennai
Pega Course in Chennai
Oracle Training in Chennai
Oracle DBA Training in Chennai
Excel Training in Chennai
Embedded System Course Chennai
Tableau Training in Chennai
Unix Training in Chennai
Power BI Training in Chennai

sheela rajesh said...

Awesome informations that you have shared for us.I eagerly waiting for more updates in future.
Hadoop Training in Chennai
Big data training in chennai
hadoop training in velachery
JAVA Training in Chennai
Python Training in Chennai
Selenium Training in Chennai
Hadoop training in chennai
Big data training in chennai
big data course in chennai

janakikrishnan said...

The information mentioned in the blog is true and useful to freshers. Keep going.
AWS Training in Bangalore
AWS Course in Bangalore
Best AWS Training in Bangalore
AWS Training Institutes in Bangalore
AWS Certification Training in Bangalore
AWS Training Center in Bangalore

Vicky Ram said...

The blog shares a lot of worthy things. Keep going..

Article submission sites

Anbarasan14 said...

This was really an impressive post, I am satisfied reading your post. Kindly share more blogs like this. I am waiting for more updates.

Spoken English Class in Anna Nagar
Spoken English Class in Porur
Spoken English Classes in T-Nagar
Spoken English Class in Adyar
Spoken English Classes in Chennai
Best Spoken English Classes in Chennai
English Speaking Classes in Mumbai
IELTS Coaching in Chennai
IELTS Classes in Mumbai

akshaya said...

I feel satisfied to read your blog, you have been delivering a useful & unique information to our vision.keep blogging.
Ethical Hacking Course in Chennai
Ethical Hacking Training in Chennai
Tally Course in Chennai
Salesforce Training in Chennai
Angularjs Training in Chennai
ui design course in chennai
web designing training in chennai

Reshma said...

Get inspired by your blog. Keep doing like this....
Ethical Hacking Course in Chennai
Ethical hacking course in bangalore
Ethical hacking course in coimbatore
Ethical Hacking Training in Bangalore
Ethical hacking Training institute in bangalore
Ethical Hacking in Bangalore
Hacking Course in Bangalore
Ethical Hacking institute in Bangalore
Selenium Training in Bangalore
Software Testing course in Bangalore

menon said...

This blog gives more attractive information.i am really impressed with this blog.
AWS Training in Chennai
AWS Training in Bangalore
AWS Training in Coimbatore
AWS Training in Hyderabad
AWS Course in Bangalore
Best AWS Training in Bangalore
AWS Training Institutes in Bangalore
AWS Certification Training in Bangalore
Data Science Courses in Bangalore
DevOps Training in Bangalore

SHASHI said...

Valuable one...thanks for sharing, waiting for next update...
QTP Training in Chennai
UFT Training in Chennai
Automation testing training in chennai
QTP Training in Anna Nagar
QTP Training in Velachery
LoadRunner Training in Chennai
Html5 Training in Chennai
clinical sas training in chennai
Spring Training in Chennai
Photoshop Classes in Chennai

IT said...

Great Article
big data projects for students

Java Training in Chennai

Final Year Projects for CSE

Java Training in Chennai

maurya said...

Really nice post. Thank you for sharing amazing information.
salesforce certification training
how to prepare for an interview
pg courses after bsc
data science tools
oracle interview questions for freshers

Mega said...

Nice post, I like to read this blog. It is very interesting to read.
interview questions on tableau
cyber security interview questions