back2dos / travix

Travis helper.
The Unlicense
33 stars 12 forks source link

Fix CORS (and cookies) with localhost with travix js #132

Closed grepsuzette closed 2 years ago

grepsuzette commented 2 years ago

I had been having erratic behaviour (not working most of the time) with unit tests using auth cookies. So, whether for merge or for others to see, here is a PR.

Note: I suppose bin/js/run.js in user project is simply generated (copied) from travix/src/js/run.js, but for some reason had to directly edit my generated bin/js/run.js with those changes. Perhaps the macro only writes it the first time; shameful but didn't check.

This solution uses the suggestion from https://stackoverflow.com/questions/52129649/puppeteer-cors-mistake/66744065#66744065

sebthom commented 2 years ago

Thanks!