hunk.code_window:       let tokenParts = BLC.words $ BL.fromStrict authzHeader
         case tokenParts of
           ["Bearer", jwt] -> return jwt
           _               -> malformedAuthzHeader
       -- see if there is a x-hasura-role header, or else pick the default role
       getCurrentRole defaultRole =
         let userRoleHeaderB = TE.encodeUtf8 userRoleHeader
             mUserRole = snd <$> find (\h -> fst h == CI.mk userRoleHeaderB) headers
  
hunk.labels: keep keep keep keep add keep keep keep keep
hunk.after_edit:     validateIsObject jVal =
         case jVal of
           A.Object x -> return x
           _          -> throw400 JWTInvalidClaims "hasura claims should be an object"
  
hunk.file_path: server/src-lib/Hasura/Server/Auth/JWT.hs
hunk.type: add
file: import globals from './Globals';
  
  const baseUrl = globals.dataApiUrl;
  const hasuractlApiHost = globals.apiHost;
  const hasuractlApiPort = globals.apiPort;
  
  const hasuractlUrl = hasuractlApiHost + ':' + hasuractlApiPort;
  
  const Endpoints = {
    getSchema: `${baseUrl}/v1/query`,
    graphQLUrl: `${baseUrl}/v1alpha1/graphql`,
    schemaChange: `${baseUrl}/v1/query`,
    query: `${baseUrl}/v1/query`,
    rawSQL: `${baseUrl}/v1/query`,
    version: `${baseUrl}/v1/version`,
    updateCheck: 'https://releases.hasura.io/graphql-engine',
    hasuractlMigrate: `${hasuractlUrl}/apis/migrate`,
    hasuractlMetadata: `${hasuractlUrl}/apis/metadata`,
    hasuractlMigrateSettings: `${hasuractlUrl}/apis/migrate/settings`,
  };
  
  const globalCookiePolicy = 'omit';
  
  export default Endpoints;
  export { globalCookiePolicy, baseUrl, hasuractlUrl };
  