Skip to content

Commit 754966d

Browse files
authored
fix: api auth from web during local dev (#1743)
1 parent ed594e9 commit 754966d

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

api/dev/configs/api.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"version": "4.22.2",
2+
"version": "4.25.2",
33
"extraOrigins": [],
44
"sandbox": true,
55
"ssoSubIds": [],

web/src/components/Wrapper/auto-mount.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ function initializeGlobalDependencies() {
3535

3636
// Initialize when DOM is ready
3737
if (typeof window !== 'undefined') {
38+
// In dev, set a mock session cookie so requests are authenticated
39+
if (import.meta.env.DEV) {
40+
document.cookie = 'unraid_session_cookie=mockusersession; path=/; SameSite=Lax';
41+
}
42+
3843
// Initialize global dependencies
3944
initializeGlobalDependencies();
4045

0 commit comments

Comments
 (0)