gratipay / grtp.co

Gratipay Widgets + API
https://grtp.co/
MIT License
26 stars 19 forks source link

Enable CORS for .js files. #153

Closed EdOverflow closed 7 years ago

EdOverflow commented 7 years ago

Solves the following issue: https://github.com/gratipay/grtp.co/issues/152

chadwhitacre commented 7 years ago

Deploying ...

chadwhitacre commented 7 years ago

End of the deploy log:

$ git push prod

[...]

remote: ├── eventemitter2@0.4.14
remote: ├── async@0.2.10
remote: ├── q@0.9.7
remote: ├── coffee-script@1.6.3
remote: ├── json5@0.2.0
remote: ├── chai@1.8.1 (assertion-error@1.0.0, deep-eql@0.1.3)
remote: ├── lodash@2.2.1
remote: ├── cheerio@0.12.4 (entities@0.5.0, underscore@1.4.4, htmlparser2@3.1.4, cheerio-select@0.0.3)
remote: ├── js-yaml@2.1.3 (argparse@0.1.16, esprima@1.0.4)
remote: ├── dalek-reporter-console@0.0.7 (cli-color@0.3.2)
remote: ├── dalek-driver-native@0.0.6 (q@1.0.1, node-pngjs@0.0.2, dalek-internal-webdriver@0.0.5)
remote: └── dalek-browser-phantomjs@0.0.5 (q@1.1.2, portscanner@1.0.0, phantomjs@1.9.20)
remote: ./node_modules/.bin/grunt build
remote: Running "uglify:dist" (uglify) task
remote: File www/v1.js created: 1.46 kB → 581 B
remote: File www/v1/api.js created: 13.91 kB → 4.28 kB
remote: File www/v2.js created: 1.44 kB → 558 B
remote: File www/v2/api.js created: 13.43 kB → 3.93 kB
remote:
remote: Running "htmlmin:dist" (htmlmin) task
remote: Minified www/v1/widgets/button.html 1.95 kB → 1.95 kB
remote: Minified www/v1/widgets/default.html 2.3 kB → 2.3 kB
remote: Minified www/v1/widgets/giving.html 2.29 kB → 2.29 kB
remote: Minified www/v2/widgets/default.html 2.26 kB → 2.26 kB
remote:
remote: Running "copy:main" (copy) task
remote: Copied 2 files
remote:
remote: Done, without errors.
remote: reload: Rejected send message, 1 matched rules; type="method_call", sender=":1.223" (uid=1000 pid=2914 comm="reload nginx ") interface="com.ubuntu.Upstart0_6.Instance" member="Reload" error name="(unset)" requested_reply="0" destination="com.ubuntu.Upstart" (uid=0 pid=1 comm="/sbin/init")
To grtp@grtp.co:production
   e48a57e..3f4e599  master -> master
[gratipay] $
chadwhitacre commented 7 years ago

I'm not seeing Access-Control-Allow-Origin on https://grtp.co/v1.js, so ... I guess the reload matters?

screen shot 2016-12-22 at 4 41 51 pm

chadwhitacre commented 7 years ago

Hmm ... maybe a permissions thing? I just logged in as root@grtp.co and did a service nginx reload and now I see the header:

screen shot 2016-12-22 at 4 43 27 pm

chadwhitacre commented 7 years ago

Not gonna worry about it further for now.

EdOverflow commented 7 years ago

OK, thanks for the informative response.

EdOverflow commented 7 years ago

I'm seeing Access-Control-Allow-Origin on my side. :)

a