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

feat(core): cors config #746

Merged
merged 10 commits into from
May 7, 2024
Merged

feat(core): cors config #746

merged 10 commits into from
May 7, 2024

Conversation

pflynn-virtru
Copy link
Member

@pflynn-virtru pflynn-virtru commented May 6, 2024

Introduces configuration via opentdf.yaml for CORS

  cors:
    enabled: false
    # '*' to allow any origin or a specific domain like 'https://yourdomain.com'
    allowedorigins: '*'
    # List of methods. Examples: 'GET,POST,PUT'
    allowedmethods:
      - GET
      - POST
      - PATCH
      - PUT
      - DELETE
      - OPTIONS
    # List of headers that are allowed in a request
    allowedheaders:
      - ACCEPT
      - Authorization
      - Content-Type
      - X-CSRF-Token
    # List of response headers that browsers are allowed to access
    exposedheaders:
      - Link
    # Sets whether credentials are included in the CORS request
    allowcredentials: true
    # Sets the maximum age (in seconds) of a specific CORS preflight request
    maxage: 3600

resolves #305

@pflynn-virtru pflynn-virtru linked an issue May 6, 2024 that may be closed by this pull request
@pflynn-virtru pflynn-virtru changed the title 305 make cors configurable feat(service): cors config May 6, 2024
@pflynn-virtru pflynn-virtru changed the title feat(service): cors config feat(core): cors config May 7, 2024
@pflynn-virtru pflynn-virtru marked this pull request as ready for review May 7, 2024 15:13
@pflynn-virtru pflynn-virtru requested a review from a team as a code owner May 7, 2024 15:13
@pflynn-virtru pflynn-virtru added this pull request to the merge queue May 7, 2024
Merged via the queue into main with commit 3433b5b May 7, 2024
16 checks passed
@pflynn-virtru pflynn-virtru deleted the 305-make-cors-configurable branch May 7, 2024 18:22
cors:
enabled: false
# '*' to allow any origin or a specific domain like 'https://yourdomain.com'
allowedorigins: '*'
Copy link
Member

Choose a reason for hiding this comment

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

@pflynn-virtru having a wildcard in the example is a footgun IMO. I would advise using localhost:* if we wanted any kind of default value that would be convenient for developers.

github-merge-queue bot pushed a commit that referenced this pull request May 7, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.4.1](service/v0.4.0...service/v0.4.1)
(2024-05-07)


### Features

* **core:** cors config
([#746](#746))
([3433b5b](3433b5b))
* **core:** Service Level Child Loggers
([#740](#740))
([aa0f210](aa0f210))
* **ers:** Create entity resolution service, replace idp plugin
([#660](#660))
([ff44112](ff44112))
* **sdk:** insecure plaintext and skip verify conn
([#670](#670))
([5c94d02](5c94d02))


### Bug Fixes

* **core:** Fix Lint
([#714](#714))
([2b0cb09](2b0cb09)),
closes [#701](#701)
* **core:** Fix several misspellings
([#738](#738))
([8d61db3](8d61db3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
tech-guru42 added a commit to tech-guru42/TDF that referenced this pull request Jun 3, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.4.1](opentdf/platform@service/v0.4.0...service/v0.4.1)
(2024-05-07)


### Features

* **core:** cors config
([#746](opentdf/platform#746))
([3433b5b](opentdf/platform@3433b5b))
* **core:** Service Level Child Loggers
([#740](opentdf/platform#740))
([aa0f210](opentdf/platform@aa0f210))
* **ers:** Create entity resolution service, replace idp plugin
([#660](opentdf/platform#660))
([ff44112](opentdf/platform@ff44112))
* **sdk:** insecure plaintext and skip verify conn
([#670](opentdf/platform#670))
([5c94d02](opentdf/platform@5c94d02))


### Bug Fixes

* **core:** Fix Lint
([#714](opentdf/platform#714))
([2b0cb09](opentdf/platform@2b0cb09)),
closes [#701](opentdf/platform#701)
* **core:** Fix several misspellings
([#738](opentdf/platform#738))
([8d61db3](opentdf/platform@8d61db3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
passion-127 added a commit to passion-127/TDF that referenced this pull request Jun 6, 2024
🤖 I have created a release *beep* *boop*
---


##
[0.4.1](opentdf/platform@service/v0.4.0...service/v0.4.1)
(2024-05-07)


### Features

* **core:** cors config
([#746](opentdf/platform#746))
([3433b5b](opentdf/platform@3433b5b))
* **core:** Service Level Child Loggers
([#740](opentdf/platform#740))
([aa0f210](opentdf/platform@aa0f210))
* **ers:** Create entity resolution service, replace idp plugin
([#660](opentdf/platform#660))
([ff44112](opentdf/platform@ff44112))
* **sdk:** insecure plaintext and skip verify conn
([#670](opentdf/platform#670))
([5c94d02](opentdf/platform@5c94d02))


### Bug Fixes

* **core:** Fix Lint
([#714](opentdf/platform#714))
([2b0cb09](opentdf/platform@2b0cb09)),
closes [#701](opentdf/platform#701)
* **core:** Fix several misspellings
([#738](opentdf/platform#738))
([8d61db3](opentdf/platform@8d61db3))

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: opentdf-automation[bot] <149537512+opentdf-automation[bot]@users.noreply.github.com>
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.

make cors configurable
4 participants