Commit cd43ae9
Fix CORS response headers (#286)
* Move CORS headers from Java filters to nginx
Varnish caches responses without varying on Origin, so whether CORS
headers appear in cached responses depends on which request first
populated the cache. Moving CORS to nginx ensures the headers are
always present on every response regardless of cache state.
Removes JAX-RS CORSFilter and Tomcat CorsFilter (web.xml /static/*);
adds Access-Control-* headers and OPTIONS preflight (204) to nginx
location / blocks in both docker-compose.yml and nginx.conf.template.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
* Add CORS header to /static/ nginx location blocks
The cors-static.sh test was failing because Access-Control-Allow-Origin
was only added to location / but not location ^~ /static/.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
---------
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>1 parent 1995c54 commit cd43ae9
File tree
5 files changed
+33
-99
lines changed- http-tests/misc
- src/main
- java/com/atomgraph/linkeddatahub
- server/filter/response
- webapp/WEB-INF
5 files changed
+33
-99
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
204 | 204 | | |
205 | 205 | | |
206 | 206 | | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
207 | 221 | | |
208 | 222 | | |
209 | 223 | | |
| |||
215 | 229 | | |
216 | 230 | | |
217 | 231 | | |
218 | | - | |
219 | | - | |
220 | 232 | | |
221 | 233 | | |
222 | 234 | | |
| |||
238 | 250 | | |
239 | 251 | | |
240 | 252 | | |
| 253 | + | |
241 | 254 | | |
242 | 255 | | |
243 | 256 | | |
| |||
253 | 266 | | |
254 | 267 | | |
255 | 268 | | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
256 | 283 | | |
257 | 284 | | |
258 | 285 | | |
| |||
269 | 296 | | |
270 | 297 | | |
271 | 298 | | |
| 299 | + | |
| 300 | + | |
272 | 301 | | |
273 | 302 | | |
274 | 303 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7 | 7 | | |
8 | 8 | | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
108 | | - | |
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
| |||
1126 | 1125 | | |
1127 | 1126 | | |
1128 | 1127 | | |
1129 | | - | |
1130 | 1128 | | |
1131 | 1129 | | |
1132 | 1130 | | |
| |||
Lines changed: 0 additions & 77 deletions
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
373 | 373 | | |
374 | 374 | | |
375 | 375 | | |
376 | | - | |
377 | | - | |
378 | | - | |
379 | | - | |
380 | | - | |
381 | | - | |
382 | | - | |
383 | | - | |
384 | | - | |
385 | | - | |
386 | | - | |
387 | | - | |
388 | | - | |
389 | | - | |
390 | | - | |
391 | | - | |
392 | | - | |
| 376 | + | |
393 | 377 | | |
394 | 378 | | |
395 | 379 | | |
| |||
0 commit comments