Skip to content
Snippets Groups Projects

CORS Fix Update

Merged Spencer Sutton requested to merge aws-integration into master
1 unresolved thread

Merge request reports

Pipeline #29468 passed with warnings

Pipeline passed with warnings for a02c2815 on aws-integration

Deployed to A‎WS‎ 4 years ago
Deployed to I‎BM‎ 4 years ago
Approval is optional

Merged by Spencer SuttonSpencer Sutton 4 years ago (Mar 3, 2021 1:36pm UTC)

Merge details

  • Changes merged into with afa6ef62.
  • Deleted the source branch.

Pipeline #30573 passed with warnings

Pipeline passed with warnings for afa6ef62 on master

Deployed to I‎BM‎ 4 years ago
Deployed to A‎WS‎ 4 years ago

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
16 package org.opengroup.osdu.notification.utils;
17
18 import org.opengroup.osdu.core.common.http.ResponseHeadersFactory;
19 import org.opengroup.osdu.core.common.model.http.DpsHeaders;
20 import org.springframework.beans.factory.annotation.Value;
21 import org.springframework.stereotype.Component;
22
23 import javax.inject.Inject;
24 import javax.servlet.*;
25 import javax.servlet.http.HttpServletResponse;
26 import java.io.IOException;
27 import java.util.Map;
28
29
30 @Component
31 public class NotificationFilter implements Filter {
  • Can you please help me understand why this filter is needed? For the environment variable getting introduced, what is the expectation?

  • Author Contributor

    The filter class is introduced here to inject headers, for a similar example already in master see Storage service's StorageFilter under the util folder.

    If the env var isn't set, cors defaults to permissive being "*". This is what was intended before but was being set to "[*]" which is invalid.

    Without this change, admin ui won't work on your platform.

    Edited by Spencer Sutton
  • Thanks, for sharing. :)

  • Please register or sign in to reply
  • Dmitriy Rudko approved this merge request

    approved this merge request

  • Spencer Sutton mentioned in commit afa6ef62

    mentioned in commit afa6ef62

  • added MRBugfix label

  • changed milestone to %M4 - Release 0.7

  • Please register or sign in to reply
    Loading