Azure / Azure/static-web-apps

Data API not obeying cache control headers with Edge CDN

Open
#1,338 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
346
Forks
67
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**

When using the Enterprise Edge CDN, it is not obeying the cache control headers for the Data API. We should be able to set these headers in the config.

We have a simple CRUD app which we update data, and it's unacceptable to wait 5+ minutes or purge the cache every time to see these updates.

**To Reproduce**

1. Set the `Cache-Control` headers in the staticwebapp.config.json file.
2. Turn on enterprise edge
3. Turn on data API
4. Go to website, and notice results are getting cached.

**Expected behavior**
The `Cache-Control` headers should be obeyed by Data API when using Enterprise Edge.

**Screenshots**
![image](https://github.com/Azure/static-web-apps/assets/229083/8da98b41-a9bd-491f-8fa6-6c2c28628d43)
![image](https://github.com/Azure/static-web-apps/assets/229083/b24ecf15-71c1-4d92-8a5d-ec9002b87c5e)

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.