Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Removing CORS hack and adding a proper middleware for handling CORS headers #42

Merged
merged 4 commits into from
Jun 23, 2020
Merged

Removing CORS hack and adding a proper middleware for handling CORS headers #42

merged 4 commits into from
Jun 23, 2020

Conversation

joselsegura
Copy link
Collaborator

Description

Remove CORS headers hack and use a proper middleware for handling the CORS headers.

Fixes #24

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • Refactor (refactoring code, removing useless files)

Testing steps

Regular CI

Copy link
Collaborator

@tisnik tisnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just pleae delete go.sum and regenerate it. LGTM instead.

go.sum Outdated
github.com/RedHatInsights/cloudwatch v0.0.0-20200512151223-b0b55757a24b/go.mod h1:8l+HqU8iWM6hA9kSAHgY3ItSlpEsPr8fb2R0GBp9S0U=
github.com/RedHatInsights/insights-content-service v0.0.0-20200610101541-f0c10d6d451d h1:0aXuHiiucADzC++1lOJs3u4k1UanSNX+wIcpnyi8Bi0=
github.com/RedHatInsights/insights-content-service v0.0.0-20200610101541-f0c10d6d451d/go.mod h1:j3Mc+Xh2ospxJ+K2RIZjYlI6E6E4H2Qh3cgUzhstrfQ=
github.com/RedHatInsights/insights-operator-utils v1.0.1/go.mod h1:gRzYBMY4csuOXgrxUuC10WUkz6STOm3mqVsQCb+AGOQ=
github.com/RedHatInsights/insights-operator-utils v1.0.2-0.20200610143236-c868b2f93d2a h1:/aAv1hq0ZFLDIxfmdTR23cm/B6nHEOVlWxOreOMqr80=
github.com/RedHatInsights/insights-operator-utils v1.0.2-0.20200610143236-c868b2f93d2a/go.mod h1:0rhk13kn0BB+yKdfZjpMoQy0lXdXY3i4NJ1xGwGMcII=
github.com/RedHatInsights/insights-operator-utils v1.1.0 h1:Bhoqqopchg4OgbDTx72PVQUuFlymyMyQPYEqN0YELP0=
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks like a leftover.

go.sum Show resolved Hide resolved
@codecov-commenter
Copy link

Codecov Report

Merging #42 into master will increase coverage by 3.03%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #42      +/-   ##
==========================================
+ Coverage   30.46%   33.49%   +3.03%     
==========================================
  Files          10       10              
  Lines         627      627              
==========================================
+ Hits          191      210      +19     
+ Misses        411      393      -18     
+ Partials       25       24       -1     
Impacted Files Coverage Δ
server/server.go 46.35% <100.00%> (+9.89%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b9d3a80...e41dc51. Read the comment docs.

@tisnik tisnik self-requested a review June 23, 2020 08:24
Copy link
Collaborator

@tisnik tisnik left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@joselsegura joselsegura merged commit c227c8e into RedHatInsights:master Jun 23, 2020
@joselsegura joselsegura deleted the proper_cors_headers branch June 23, 2020 08:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return proper CORS headers in all REST API responses
4 participants