puppet-tilde icon indicating copy to clipboard operation
puppet-tilde copied to clipboard

Nginx configuration: enable cross-origin requests?

Open datagrok opened this issue 10 years ago • 0 comments

See https://github.com/tildeclub/tilde.club/issues/80

TL;DR: tilde.town serves only static content so it's safe to add the header to every HTTP response (or to only .txt and .json responses to save a teensy bit of bandwidth):

Access-Control-Allow-Origin: *

Which will allow JavaScript widgets on any other website to use $.getJSON() and other XHR style requests to retrieve content hosted on tilde.town.

datagrok avatar Dec 01 '14 08:12 datagrok