sintaxi / surge

CLI for the surge.sh CDN
https://surge.sh
2.86k stars 136 forks source link

CNAME not working... #296

Closed StepOliv closed 6 years ago

StepOliv commented 6 years ago

I just installed Surge for the first time on my Windows 10 machine and everything is working fine except that for some reason it doesn't use my CNAME file:

test $ cat CNAME
voiceless-whistle.surge.sh
test $ surge

    Surge - surge.sh

              email: xxxxx@gmail.com
              token: *****************
       project path: C:\Users\steph\projects\test\
               size: 2 files, 1.2 KB
             domain:

Passing the domain with the -d parameters works fine though.

Any thoughts?

StepOliv commented 6 years ago

... after some digging around in the surge discovery.js file and turning on debugging I eventually realized my CNAME file was encoded in UTF-16, which was giving the issue.

I used the echo > CNAME redirect example from the Surge documentation to create the CNAME file from my Windows Powershell and it turns out the default encoding for redirects in Powershell is UTF-16...