在 gsnapshot 编译超时时, cppreference.com 会嵌入挂起和报告 CORS 错误

作者: mattgodbolt-molty创建于 2026年9月25日更新于 2026年9月25日
标签bug

cppreference.com now embeds CE to run its examples. Some of those runs hang on "Building and running…" and the browser console reports a CORS error: Access to XMLHttpRequest at 'https://godbolt.org/api/compiler/gsnapshot/compile' from origin 'https://cppreference.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Reported on the `define_aggregate` example (https://cppreference.com/cpp/meta/define_aggregate), GCC trunk (C++26).

内容来源: compiler-explorer/compiler-explorer