Enforce CORS

This commit is contained in:
Ahmed Al-Taiar
2024-10-07 23:09:18 -04:00
parent 11783069a8
commit 3c2b944bf4
6 changed files with 43 additions and 11 deletions

View File

@@ -12,7 +12,14 @@ const App = () => (
<FatalErrorBoundary page={FatalErrorPage}>
<RedwoodProvider titleTemplate="%PageTitle | %AppTitle">
<AuthProvider>
<RedwoodApolloProvider useAuth={useAuth}>
<RedwoodApolloProvider
useAuth={useAuth}
graphQLClientConfig={{
httpLinkConfig: {
credentials: 'include',
},
}}
>
<Routes />
</RedwoodApolloProvider>
</AuthProvider>

View File

@@ -1,5 +1,9 @@
import { createDbAuthClient, createAuth } from '@redwoodjs/auth-dbauth-web'
const dbAuthClient = createDbAuthClient()
const dbAuthClient = createDbAuthClient({
fetchConfig: {
credentials: 'include',
},
})
export const { AuthProvider, useAuth } = createAuth(dbAuthClient)