console: set coookie policy for API calls to same-origin (#4336)

This commit is contained in:
Rikin Kachhia 2020-04-09 16:03:29 +05:30 committed by GitHub
parent 14b5d10dfb
commit c08171ac89
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 5 additions and 3 deletions

View File

@ -18,6 +18,7 @@ The order and collapsed state of columns is now persisted across page navigation
- console: allow customising graphql field names for columns of views (close #3689) (#4255)
- console: fix clone permission migrations (close #3985) (#4277)
- console: decouple data rows and count fetch in data browser to account for really large tables (close #3793) (#4269)
- console: update cookie policy for API calls to "same-origin"
- docs: add One-Click Render deployment guide (close #3683) (#4209)
- server: reserved keywords in column references break parser (fix #3597) #3927
- server: fix postgres specific error message that exposed database type on invalid query parameters (#4294)

View File

@ -21,7 +21,7 @@ const Endpoints = {
telemetryServer: 'wss://telemetry.hasura.io/v1/ws',
};
const globalCookiePolicy = 'omit';
const globalCookiePolicy = 'same-origin';
export default Endpoints;
export { globalCookiePolicy, baseUrl, hasuractlUrl };

View File

@ -7,7 +7,8 @@ import {
DONE_REQUEST,
FAILED_REQUEST,
ERROR_REQUEST,
} from 'components/App/Actions';
} from '../components/App/Actions';
import { globalCookiePolicy } from '../Endpoints';
const requestAction = (
url,
@ -17,7 +18,7 @@ const requestAction = (
includeCredentials = true
) => {
if (!options.credentials && includeCredentials) {
options.credentials = 'omit';
options.credentials = globalCookiePolicy;
}
return dispatch => {