All checks were successful
Deploy / deploy (push) Successful in 1m52s
VAD на iPad валился с «no available backend found / RangeError». onnxruntime-web 1.24 ships только threaded WASM сборки, которые требуют SharedArrayBuffer. iOS Safari его не даёт без cross-origin isolation — отсюда и ошибка. Добавляем заголовки: Cross-Origin-Opener-Policy: same-origin Cross-Origin-Embedder-Policy: credentialless credentialless (а не require-corp) выбрали чтобы не ломать внешние ресурсы без CORP-заголовка (Google Fonts, wttr.in). Поддержка: Chrome 96+, Firefox 110+, Safari 16.4+.
29 lines
764 B
JavaScript
29 lines
764 B
JavaScript
/** @type {import('next').NextConfig} */
|
|
const nextConfig = {
|
|
output: "standalone",
|
|
images: {
|
|
remotePatterns: [
|
|
{
|
|
protocol: "https",
|
|
hostname: "wttr.in",
|
|
},
|
|
],
|
|
},
|
|
async headers() {
|
|
return [
|
|
{
|
|
source: "/(.*)",
|
|
headers: [
|
|
{ key: "X-Content-Type-Options", value: "nosniff" },
|
|
// SharedArrayBuffer для onnxruntime-web threaded WASM (нужен на iOS).
|
|
// credentialless менее строгий чем require-corp — не ломает Google Fonts.
|
|
{ key: "Cross-Origin-Opener-Policy", value: "same-origin" },
|
|
{ key: "Cross-Origin-Embedder-Policy", value: "credentialless" },
|
|
],
|
|
},
|
|
];
|
|
},
|
|
};
|
|
|
|
export default nextConfig;
|