Http Proxy Middleware for Shopware Frontends.
npm install shopware-frontends-proxy
This will extend the nuxt.options.shopware
which is also used by shopware/frontends
as configuration.
// nuxt.config.ts
export default defineNuxtConfig({
modules: ['shopware-frontends-proxy'],
shopware: {
shopwareEndpoint: 'YOUR_SHOPWARE_FRONTENDS_URL',
proxyDestinationEndpoint: 'YOUR_SHOPWARE_6_API_ENDPOINT',
shopwareAccessToken: 'SHOPWARE_6_ACCESS_TOKEN',
proxy: true,
},
})
This module creates a proxy to bypass preflight requests in your shopware-frontends app. See the following links for the motivation for this module: