shopware-frontends-proxy
Version:
This Shopware Frontends (nuxt3) module proxies requests to the Shopware 6 instance to bypass preflight requests.
40 lines (22 loc) • 947 B
Markdown
# Shopware Frontends Proxy Module
Http Proxy Middleware for Shopware Frontends.
## Installation
```npm install shopware-frontends-proxy```
## Usage
### This will extend the `nuxt.options.shopware` which is also used by `shopware/frontends` as configuration.
```js
// 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,
},
})
```
## Description
This module creates a proxy to bypass preflight requests in your shopware-frontends app. See the following links for the motivation for this module:
[Shopware Frontends Feature Request](https://github.com/shopware/frontends/issues/30)
[Shopware PWA Feature Request](https://github.com/vuestorefront/shopware-pwa/issues/1602)