You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/edu/harvard/iq/dataverse/filter/CorsFilter.java
+14-3Lines changed: 14 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -28,11 +28,22 @@
28
28
* 1. Reads CORS configuration from JVM settings (dataverse.cors.*). See the Dataverse Configuration Guide for more details.
29
29
* 2. Determines whether CORS should be allowed based on these settings.
30
30
* 3. If CORS is allowed, it adds the appropriate CORS headers to all HTTP responses. The JVMSettings allow customization of the header contents if desired.
31
-
*
31
+
*
32
+
* The broader dispatcher set is intentional:
33
+
* - REQUEST applies CORS to direct client requests.
34
+
* - FORWARD covers internal forwards, including API paths rewritten by
35
+
* {@link edu.harvard.iq.dataverse.api.ApiRouter} from {@code /api/...} to {@code /api/v1/...}.
36
+
* - ERROR ensures error responses also carry CORS headers, so browser clients can read error details.
37
+
* - ASYNC keeps behavior consistent for asynchronous servlet/JAX-RS processing.
38
+
*
32
39
* The filter is applied to all paths ("/*") in the application.
0 commit comments