sst / open-next

Open source Next.js serverless adapter
https://open-next.js.org
MIT License
3.73k stars 112 forks source link

Permissions-Policy header in next.config.mjs causes Missing pattern at 7 TypeError #332

Closed grefrit closed 1 month ago

grefrit commented 7 months ago

Try to add Permissions-Policy to next.config.mjs with camera=(), microphone=(), geolocation=() value. You will see

Invoke Error    {
  "errorType": "TypeError",
  "errorMessage": "Missing pattern at 7",
  "stack": [
    "TypeError: Missing pattern at 7",
    "    at n8e (file:///var/task/index.mjs:42:242011)",
    "    at aO (file:///var/task/index.mjs:42:242248)",
    "    at r8e (file:///var/task/index.mjs:42:243214)",
    "    at file:///var/task/index.mjs:50:3232",
    "    at Array.forEach (<anonymous>)",
    "    at Y7 (file:///var/task/index.mjs:50:3158)",
    "    at nee (file:///var/task/index.mjs:50:10193)",
    "    at iee (file:///var/task/index.mjs:50:12077)",
    "    at Runtime.handler (file:///var/task/server-index.mjs:15:10)"
  ]
}

is SST console

conico974 commented 1 month ago

This works in V3