-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cors configs for remove items #EA-3958
- Loading branch information
Showing
1 changed file
with
8 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -72,13 +72,20 @@ public void addCorsMappings(CorsRegistry registry) { | |
.allowCredentials(false).maxAge(600L); // in seconds | ||
|
||
|
||
// insert/remove multiple items | ||
registry.addMapping("/set/*/items").allowedOrigins("*").allowedMethods("PUT", "DELETE") | ||
Check warning Code scanning / SonarCloud The program defines an overly permissive Cross-Origin Resource Sharing (CORS) policy See more on SonarQube Cloud Warning
The program defines an overly permissive Cross-Origin Resource Sharing (CORS) policy See more on SonarQube Cloud
|
||
.exposedHeaders(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, | ||
HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS, HttpHeaders.ALLOW, HttpHeaders.ETAG, | ||
HttpHeaders.VARY, HttpHeaders.PREFERENCE_APPLIED) | ||
.allowCredentials(false).maxAge(600L); // in seconds | ||
|
||
// publish/unpublish | ||
registry.addMapping("/set/*/*").allowedOrigins("*").allowedMethods("PUT") | ||
.exposedHeaders(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, | ||
HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS, HttpHeaders.ALLOW, HttpHeaders.ETAG, | ||
HttpHeaders.VARY, HttpHeaders.PREFERENCE_APPLIED) | ||
.allowCredentials(false).maxAge(600L); // in seconds | ||
|
||
// add,remove,exists item in set | ||
registry.addMapping("/set/*/*/*").allowedOrigins("*") | ||
.allowedMethods("GET", "HEAD", "PUT", "DELETE") | ||
|