thisandagain / fastly

Fastly API client for Node.js
MIT License
70 stars 28 forks source link

forward slash in the surrogate key not supported #40

Open timtyrrell opened 6 years ago

timtyrrell commented 6 years ago

I changed my key so I am not worried about it anymore, but figured I would mention it here. If you have a key like "some/thing", since the code is literally just appending on the end of a url, the purge doesn't actually work but gives an OK like it did.

Code referenced below: https://github.com/thisandagain/fastly/blob/develop/lib/index.js#L92

var url = '/service/' + encodeURIComponent(service) + '/purge/' + key;