@quvel-kit/core 1.3.10 → 1.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../src/utils/axios.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAqB,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAsCrD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CASnE;AAoBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,aAAa,CA0D1G"}
1
+ {"version":3,"file":"axios.d.ts","sourceRoot":"","sources":["../../src/utils/axios.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAC,aAAa,EAAqB,MAAM,OAAO,CAAC;AAE7D,OAAO,KAAK,EAAC,WAAW,EAAC,MAAM,kBAAkB,CAAC;AAClD,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAsCrD;;GAEG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,MAAM,CASnE;AAoBD;;;;GAIG;AACH,wBAAgB,iBAAiB,CAAC,UAAU,CAAC,EAAE,WAAW,EAAE,SAAS,CAAC,EAAE,QAAQ,CAAC,SAAS,CAAC,GAAG,aAAa,CAgE1G"}
@@ -89,6 +89,11 @@ export function createApiInstance(ssrContext, appConfig) {
89
89
  const instance = axios.create(axiosConfig);
90
90
  let hasSessionCookie = false;
91
91
  if (ssrContext) {
92
+ // Set Origin header so Sanctum recognizes SSR requests as stateful
93
+ const frontendUrl = appConfig?.frontend?.url || ssrContext.req?.headers?.origin;
94
+ if (frontendUrl) {
95
+ instance.defaults.headers.common['Origin'] = frontendUrl;
96
+ }
92
97
  if (appConfig?.api?.ssrKey) {
93
98
  const ssrKeyHeaderName = getSsrKeyHeader(appConfig);
94
99
  instance.defaults.headers.common[ssrKeyHeaderName] = appConfig.api.ssrKey;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@quvel-kit/core",
3
- "version": "1.3.10",
3
+ "version": "1.3.11",
4
4
  "description": "Core utilities for Quvel UI",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",