{"action":"created","issue":{"url":"https://api.github.com/repos/graphile/postgraphile/issues/150","repository_url":"https://api.github.com/repos/graphile/postgraphile","labels_url":"https://api.github.com/repos/graphile/postgraphile/issues/150/labels{/name}","comments_url":"https://api.github.com/repos/graphile/postgraphile/issues/150/comments","events_url":"https://api.github.com/repos/graphile/postgraphile/issues/150/events","html_url":"https://github.com/graphile/postgraphile/issues/150","id":182480798,"number":150,"title":"Hapi plugin usage","user":{"login":"mytototo","id":2677247,"avatar_url":"https://avatars2.githubusercontent.com/u/2677247?v=4","gravatar_id":"","url":"https://api.github.com/users/mytototo","html_url":"https://github.com/mytototo","followers_url":"https://api.github.com/users/mytototo/followers","following_url":"https://api.github.com/users/mytototo/following{/other_user}","gists_url":"https://api.github.com/users/mytototo/gists{/gist_id}","starred_url":"https://api.github.com/users/mytototo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mytototo/subscriptions","organizations_url":"https://api.github.com/users/mytototo/orgs","repos_url":"https://api.github.com/users/mytototo/repos","events_url":"https://api.github.com/users/mytototo/events{/privacy}","received_events_url":"https://api.github.com/users/mytototo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":19,"created_at":"2016-10-12T09:43:30Z","updated_at":"2018-03-17T20:58:03Z","closed_at":null,"author_association":"NONE","body":"Hey! I saw it's possible to use `postgraphql` as a middleware for `express`. Is it possible to use it as a `hapi` plugin? Thanks.\n"},"comment":{"url":"https://api.github.com/repos/graphile/postgraphile/issues/comments/373952090","html_url":"https://github.com/graphile/postgraphile/issues/150#issuecomment-373952090","issue_url":"https://api.github.com/repos/graphile/postgraphile/issues/150","id":373952090,"user":{"login":"mshick","id":277401,"avatar_url":"https://avatars1.githubusercontent.com/u/277401?v=4","gravatar_id":"","url":"https://api.github.com/users/mshick","html_url":"https://github.com/mshick","followers_url":"https://api.github.com/users/mshick/followers","following_url":"https://api.github.com/users/mshick/following{/other_user}","gists_url":"https://api.github.com/users/mshick/gists{/gist_id}","starred_url":"https://api.github.com/users/mshick/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mshick/subscriptions","organizations_url":"https://api.github.com/users/mshick/orgs","repos_url":"https://api.github.com/users/mshick/repos","events_url":"https://api.github.com/users/mshick/events{/privacy}","received_events_url":"https://api.github.com/users/mshick/received_events","type":"User","site_admin":false},"created_at":"2018-03-17T20:58:03Z","updated_at":"2018-03-17T20:58:03Z","author_association":"NONE","body":"@benjie Doh, yes, of course... I've been in CORS / AJAX land for so long I sometimes forget.\r\n\r\nI'm going to do some more research on this one, and see if hapi has a suggested approach. I know about [crumb](https://github.com/hapijs/crumb) which is a plugin somebody could easily layer on to the route for anti-CSRF token support. \r\n\r\nI'd like to see if hapi has origin / referer header verification options for all requests, or if I could / should bake some sort of `allowedOrigins` option into this plugin.\r\n\r\nBased on the [Prevention Cheat Sheet](https://www.owasp.org/index.php/Cross-Site_Request_Forgery_(CSRF)_Prevention_Cheat_Sheet) I would assume that if I can verify these headers I should be good against browser-based CSRF attacks.\r\n\r\nThanks so much for bringing this up.\r\n\r\n"}}
{"actor":{"display_login":"mshick"}}