TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Running untrusted JavaScript code in simple, fast (~20ms) & safe manner

2 点作者 cheerioty将近 3 年前
We recently had to solve the challenge of executing untrusted code (from users and 3rd-party extension developers) and eventually ended up with this fast and completely stateless service at which we can throw any script and context with nothing more than a simple request.<p>Not only can get the result back (whatever the script returns), but also allow for outbound requests via a custom fetch implementation, which further allows scripts for making pre-authenticated requests to our own product API, but also to those of other products people have linked to their account. All without exposing the actual access tokens, or course.<p>Would anyone be interested in using such a service? And for those who already solved this themselves, what&#x27;s your way of running untrusted code (from users or extension developers) in a fast &amp; secure manner?

暂无评论

暂无评论