Shopify / shopify-app-template-php

263 stars 85 forks source link

chore: Add access control headers for embedded apps #460

Closed elanalynn closed 1 year ago

elanalynn commented 1 year ago

WHY are these changes introduced?

Embedded apps need to set certain headers to ensure they can run in an iframe and receive requests from extensions.

WHAT is this pull request doing?

This PR checks if the app is embedded and if so, sets the following headers for all responses:

Checklist

Note: once this PR is merged, it becomes a new release for this template.