Cloudflare的worker的JS里面 字符串不能包含 perl -pe空格

一个非常简单的测试.
你创建一个worker, 然后把hello world修改为
perl -pe空格
* 注意字符串的末尾有个空格.

部署就会报错
API Request Failed: PUT /api/v4/accounts/9e0d39b714fdd7b1b66d46589d33ba59/workers/services/fragrant-hill-498d/environments/production?include_subdomain_availability=true (403)



处理方法就是用一个字符串包含 perl -pe, 再用字符串拼接的方式添加空格.

很明显, 这是Cloudflare的worker的一个bug.
所以, 读者千万不要当作一个JS小知识给学习了. 哈哈

========
Github 项目已更新
https://github.com/crazypeace/gh-proxy/

========
感谢
fscarmen https://t.me/fscarmen2

评论

The Hot3 in Last 30 Days