ShopifexWeb.Routes (Shopifex v2.2.1) View Source
Provides macros for easily responding to Shopify requests within your Shopifex router.
pipelines
Call the pipelines
macro in your router to inject some standard router pipelines into your router module.
These pipelines can be used for responding to webhooks, admin links, proxy requests, and requests to load your app within the Shopify admin.
auth routes
Call the auth_routes
macro in your router to inject the standard Shopify app routes which your app will need.
This includes routes for loading the app in Shopfiy the admin, app installation and app updates.
payment routes
Call the payment_routes
macro in your router to inject the routes required by the Shopifex PaymentGuard system.
Link to this section Summary
Functions
Injects the following Shopify router pipelines into your Shopifex application's router.
Link to this section Functions
payment_routes(controller \\ ShopifexWeb.PaymentController, opts \\ [])
View Source (macro)Injects the following Shopify router pipelines into your Shopifex application's router.
:shopify_session
: Validates request (HMAC header/param or token param) and makes session information available via Shopifex.Plug API. Also removes iFrame blocking headers so app can render in Shopify admin.:shopify_webhook
: Validates Shopify webhook requests HMAC and makes session information available via Shopifex.Plug API.:shopify_admin_link
: Validates Shopify admin link & bulk action link requests and makes session information available via Shopifex.Plug API. Also removes iFrame blocking headers so app can render in Shopify admin.:shopify_api
: Ensures that a valid Shopify session token or Shopifex token are present in Authorization header. Useful for async requests between your SPA front end and Shopifex backend.:shopifex_browser
: Same as your normal :browser pipeline, except it calls Shopifex.Plug.LoadInIframe. Deprecated; does not work with Phoenix 1.6 generated apps.:shopify_embedded
: Sets Content-Security-Policy headers to restrict app loading to within the Shopify admin. Read more: https://shopify.dev/apps/store/security/iframe-protection#embedded-apps