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

Limit network requests to current domain in Kinto Admin using CSP #1655

Merged
merged 1 commit into from
May 29, 2018

Conversation

leplatrem
Copy link
Contributor

@leplatrem leplatrem commented May 28, 2018

See ulfr recommandation Kinto/kinto-admin#460 (comment)

@leplatrem leplatrem requested a review from magopian May 28, 2018 15:17
settings = {
'authMethods': aslist(request.registry.settings.get('multiauth.policies'))
}
globalSettings = '<script>window.globalSettings = {};</script>'.format(json.dumps(settings))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If we don't need to generate the settings from the installed kinto plugins, we don't need to have a python view anymore to render the html page. (except maybe to route between the index.html page and the help page but do we really?)

@@ -5,8 +5,7 @@ import * as signoffPlugin from "kinto-admin/lib/plugins/signoff";

const settings = {
maxPerPage: 50,
singleServer: document.location.toString().split('/admin/')[0],
...window.globalSettings,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this related to the CSP feature?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I opened #1658 :)

@leplatrem leplatrem merged commit 00b31b4 into master May 29, 2018
@leplatrem leplatrem deleted the csp-kinto-admin branch May 29, 2018 10:09
Copy link
Contributor

@magopian magopian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants