Skip to content

Commit

Permalink
Revert "Rollback CORS server changes (bcgov#1869)"
Browse files Browse the repository at this point in the history
This reverts commit b114cfc.
  • Loading branch information
sukhpalp committed May 2, 2024
1 parent 2c1f9b8 commit d7242aa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@

@Path("/situationReport")
@Api(value = "SituationReportEndpoint", authorizations = { @Authorization(value = "Webade-OAUTH2", scopes = { @AuthorizationScope(scope = Scopes.GET_TOPLEVEL, description = "") }) })
@CrossOrigin(origins = "*", allowedHeaders = "*", methods = {RequestMethod.GET, RequestMethod.OPTIONS, RequestMethod.HEAD, RequestMethod.PUT, RequestMethod.POST, RequestMethod.DELETE}, allowCredentials = "true")
public interface SituationReportEndpoint extends BaseEndpoints {
@ApiOperation(value = "Add a Sitation Report Resource", response = SituationReportResource.class, notes = "Add a Situation Report", authorizations = { @Authorization(value = "Webade-OAUTH2", scopes = { @AuthorizationScope(scope = Scopes.CREATE_PUBLISHED_INCIDENT, description = "") }) }, extensions = {@Extension(properties = {@ExtensionProperty(name = "auth-type", value = "#{wso2.x-auth-type.app_and_app_user}"), @ExtensionProperty(name = "throttling-tier", value = "Unlimited") })})
@ApiImplicitParams({
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ public CorsConfigurationSource corsConfigurationSource() {

configuration.setAllowedOrigins(Collections.unmodifiableList(Arrays.asList("*")));
configuration.setAllowedMethods(Collections.unmodifiableList(Arrays.asList("HEAD", "GET", "POST", "DELETE", "PUT", "OPTIONS")));
// configuration.setAllowCredentials(true);
configuration.setAllowCredentials(true);
configuration.setAllowedHeaders(Collections.unmodifiableList(Arrays.asList("*")));

final UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
Expand Down

0 comments on commit d7242aa

Please sign in to comment.