Passing Cookie headers to Server having external host #5172
-
Hi, Sveltekit Load Input has the https://kit.svelte.dev/docs/loading#input-fetch Now here is my situation, we have An Api server (having a different hostname which is pretty common) which supports CORS for our domain. The api request requires user's credentials (user cookie header). Previously we were just using https://developer.mozilla.org/en-US/docs/Web/API/fetch#credentials Now I can understand it might be decided for security risk, but its also a valid use case. The only way around I can see is to use an endpoint as a proxy. But that defeats all the benefits of using CORS in the first place with the extra Round trip to the server. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
This would be fixed by #5195, which would let you forward headers any way you like... emulating the browser security model or taking advantage of the omnipotence that comes with server side code. |
Beta Was this translation helpful? Give feedback.
This would be fixed by #5195, which would let you forward headers any way you like... emulating the browser security model or taking advantage of the omnipotence that comes with server side code.