Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Merged
merged 6 commits into from
Apr 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion console/src/Endpoints.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 };
5 changes: 3 additions & 2 deletions console/src/utils/requestAction.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -17,7 +18,7 @@ const requestAction = (
includeCredentials = true
) => {
if (!options.credentials && includeCredentials) {
options.credentials = 'omit';
options.credentials = globalCookiePolicy;
}

return dispatch => {
Expand Down