Skip to content

Commit

Permalink
[base] Use credentialed requests in studio (#115)
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars authored and bjoerge committed Aug 24, 2017
1 parent 421b2b9 commit 1fa017e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/@sanity/base/src/client/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import sanityClient from '@sanity/client'
import config from 'config:sanity'
import configureClient from 'part:@sanity/base/configure-client?'

const client = sanityClient(config.api)
const apiConfig = {...config.api, withCredentials: true}
const client = sanityClient(apiConfig)

export default configureClient ? configureClient(sanityClient(config.api)) : client
export default configureClient ? configureClient(sanityClient(apiConfig)) : client

0 comments on commit 1fa017e

Please sign in to comment.