next.js
41b743ad - fix: server functions x-forwarded-host possible multiple values (#73701)

Commit
1 year ago
fix: server functions x-forwarded-host possible multiple values (#73701) ## Summary The x-forwarded-host header can be an array (`string | string[] | undefined`), which used to be casted to `string | undefined`. So when comparing the origin vs the x-forwarded-host, it ends up comparing an array to a string. Resulting in the following error; ``` `x-forwarded-host` header with value `www.foo.bar, www.foo.bar` does not match `origin` header with value `www.foo.bar` from a forwarded Server Actions request. Aborting the action. ``` --------- Co-authored-by: JJ Kasper <jj@jjsweb.site>
Author
Parents
Loading