Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • O OS Core Common
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 29
    • Issues 29
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 1
    • Merge requests 1
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe Software
  • Platform
  • System
  • Lib
  • core
  • OS Core Common
  • Issues
  • #21

Closed
Open
Created Jan 15, 2021 by Spencer Sutton@spencerOwner

CORS not implemented properly in os-core-common ResponseHeaders class

Most of the Spring filters in our services set response headers from the ResponseHeaders class in os-core-common: Screen_Shot_2021-01-14_at_4.23.16_PM

There are several problems with the way these headers are set:

  • Access-Control-Allow-Origin resolves to [*] which doesn’t work at all with front-end apps, it would need to resolve to * to work
  • Even if Access-Control-Allow-Origin did resolve to *, it would be very insecure
  • Similarly, Access-Control-Allow-Methods resolves to a list which also doesn’t work at all with front-end apps. It needs to resolve to a comma-delimited string

Without addressing these issues, efforts like the Admin UI will fail because it won’t be able to interact with the platform without proper CORS implementation in place.

Proposed Resolution:

  • Set Access-Control-Allow-Origin header from environment variable
  • Make Access-Control-Allow-Methods resolve correctly
Assignee
Assign to
Time tracking