Commit aedeeb2
committed
Add CORS headers to actual responses and fix premature response flush
- Remove early ctx.writeAndFlush(response) to avoid sending response before headers are finalized
- Add dynamic CORS headers (Access-Control-Allow-Origin, Vary, Allow-Credentials) to normal responses
- Respect request Origin header and configuration for allowed origins and credentials1 parent 975e34e commit aedeeb2
File tree
1 file changed
+12
-2
lines changed- src/main/java/org/tinystruct/handler
1 file changed
+12
-2
lines changedLines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
103 | | - | |
104 | 102 | | |
105 | 103 | | |
106 | 104 | | |
| |||
126 | 124 | | |
127 | 125 | | |
128 | 126 | | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
129 | 139 | | |
130 | 140 | | |
131 | 141 | | |
| |||
0 commit comments