evantravers / middleman-contact-form

Simple sinatra application, intended for heroku to send emails from contact requests from a static middleman app deployed on s3.
MIT License
38 stars 12 forks source link

This is to address Cross-origin resource sharing (CORS) issue with Ajax #4

Closed billyboozer closed 10 years ago

billyboozer commented 10 years ago

This before filter is to address Cross-origin resource sharing (CORS) issue with Ajax submission of contect form. Solutions was found here: http://stackoverflow.com/questions/17027117/jquery-ajax-request-to-sinatra-app-blocked-by-cors Before filters are evaluated before each request within the context of the request and can modify the request and response Context for before filters in sinatra: http://www.sinatrarb.com/intro?name=filters#Filters

evantravers commented 10 years ago

Thanks @billyboozer! :cake: