puppet-tilde
puppet-tilde copied to clipboard
Nginx configuration: enable cross-origin requests?
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.