Closed ghost closed 5 years ago
A 400
response probably means Squarespace doesn't like the combination of headers it's getting.
You can use curl to reproduce what the proxy function should be doing:
curl -D - -o /dev/null https://example.squarespace.com -H "Host: example.squarespace.com" -H "X-Forwarded-Host: example.squarespace.com" -sS
Ok, the 400 error was happening because we weren't sending a user-agent header in the tests. I added that.
Now it's legitimately not working, any requests through the CDN app to squarespace get redirected to example.squarespace.com/[session]
. If you set the rewriteLocationHeaders
option to true
when it creates the proxy, it should take care of that.
The test case I added is still failing and I'm not sure why. :) Can I get a second set of eyes on it?
Related to #10