Skip to content

Instantly share code, notes, and snippets.

@revanth0212
Last active March 4, 2025 20:05
Show Gist options
  • Save revanth0212/1c83bd4ad0be161c209cef07722df04c to your computer and use it in GitHub Desktop.
Save revanth0212/1c83bd4ad0be161c209cef07722df04c to your computer and use it in GitHub Desktop.
{
"meshConfig": {
"responseConfig": {
"CORS": {
"credentials": true,
"exposedHeaders": ["Content-Range", "X-Content-Range"],
"maxAge": 60480,
"methods": ["GET", "POST"],
"origin": "*"
},
"headers": {
"mode": "no-cors",
"Cache-Control": "max-age=900, s-maxage=1800, stale-while-revalidate=30, stale-if-error=86400",
"x-include-metadata": "true"
},
"includeHTTPDetails": false,
"cache": true
},
"sources": [
{
"name": "CommerceSaaSGraphQl",
"handler": {
"graphql": {
"endpoint": "${core}",
"useGETForQueries": true,
"operationHeaders": {
"Content-Type": "application/json",
"Magento-Environment-Id": "{context.headers['magento-environment-id']}",
"Magento-Website-Code": "{context.headers['magento-website-code']}",
"Magento-Store-View-Code": "{context.headers['magento-store-view-code']}",
"Magento-Store-Code": "{context.headers['magento-store-code']}",
"Magento-Customer-Group": "{context.headers['magento-customer-group']}",
"x-api-key": "{context.headers['x-api-key']}",
"Authorization": "{context.headers['Authorization']}"
}
}
},
"responseConfig": {
"headers": ["X-Magento-Cache-Id"]
}
}
]
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment