Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Add cors support for docker compose #2814

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

wslulciuc
Copy link
Member

This PR adds cors support for docker compose by:

  • Adding nginx to base docker-compose.yml
  • Adding docker/nginx/nginx.template to override Access-Control-Allow-Origin default * (= any origins)

Example

Proxy all API calls to Marquez (any origin):

# Allow access from any origin:
add_header 'Access-Control-Allow-Origin' '*';
marquez-api                 | 172.18.0.6 - - [14/May/2024:17:53:50 +0000] "POST /api/v1/lineage HTTP/1.0" 201 0 "-" "RapidAPI/4.2.0 (Macintosh; OS X/12.6.3) GCDHTTPRequest" 103
nginx                       | 192.168.65.1 - - [14/May/2024:17:53:50 +0000] "POST /api/v1/lineage HTTP/1.1" 201 5 "-" "RapidAPI/4.2.0 (Macintosh; OS X/12.6.3) GCDHTTPRequest"
HTTP/1.1 201 Created
Server: nginx/1.25.5
Date: Tue, 14 May 2024 17:53:50 GMT
Transfer-Encoding: chunked
Connection: close
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, OPTIONS, DELETE, PUT
Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization

wslulciuc added 2 commits May 14, 2024 10:54
Signed-off-by: wslulciuc <willy@datakin.com>
Signed-off-by: wslulciuc <willy@datakin.com>
@boring-cyborg boring-cyborg bot added the docker label May 14, 2024
Copy link

netlify bot commented May 14, 2024

Deploy Preview for peppy-sprite-186812 canceled.

Name Link
🔨 Latest commit d0e7c4d
🔍 Latest deploy log https://app.netlify.com/sites/peppy-sprite-186812/deploys/6643aced6043e00009927ab4

Signed-off-by: wslulciuc <willy@datakin.com>
Copy link

codecov bot commented May 14, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.57%. Comparing base (61927c2) to head (d0e7c4d).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##               main    #2814   +/-   ##
=========================================
  Coverage     84.57%   84.57%           
  Complexity     1441     1441           
=========================================
  Files           251      251           
  Lines          6503     6503           
  Branches        302      302           
=========================================
  Hits           5500     5500           
  Misses          850      850           
  Partials        153      153           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

None yet

1 participant