Skip to content

Commit c5f751d

Browse files
committed
fix(ui): include missing credentials for cookie auth
1 parent d622d3c commit c5f751d

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

packages/ui/src/elements/BulkUpload/FormsManager/index.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ export function FormsManagerProvider({ children }: FormsManagerProps) {
127127
const initialStateRef = React.useRef<FormState>(null)
128128
const getFormDataRef = React.useRef<() => Data>(() => ({}))
129129

130-
const actionURL = `${api}/${collectionSlug}`
130+
const actionURL = `${serverURL}${api}/${collectionSlug}`
131131

132132
const initializeSharedDocPermissions = React.useCallback(async () => {
133133
const params = {
@@ -301,6 +301,7 @@ export function FormsManagerProvider({ children }: FormsManagerProps) {
301301
collectionSlug,
302302
getUploadHandler({ collectionSlug }),
303303
),
304+
credentials: 'include',
304305
method: 'POST',
305306
})
306307

packages/ui/src/elements/Table/OrderableTable.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,9 @@ export const OrderableTable: React.FC<Props> = ({
119119
target,
120120
}
121121

122-
const response = await fetch(`${config.routes.api}/reorder`, {
122+
const response = await fetch(`${config.serverURL}${config.routes.api}/reorder`, {
123123
body: JSON.stringify(jsonBody),
124+
credentials: 'include',
124125
headers: {
125126
'Content-Type': 'application/json',
126127
},

0 commit comments

Comments
 (0)