Skip to content

Conversation

torcolvin
Copy link
Collaborator

This allows DB scoped methods to have CORS information.

I considered better ways to solve this with CORS middleware like https://github.com/go-chi/cors (there's a gorilla mux version, but gorilla mux is dead).

Pre-review checklist

  • Removed debug logging (fmt.Print, log.Print, ...)
  • Logging sensitive data? Make sure it's tagged (e.g. base.UD(docID), base.MD(dbName))
  • Updated relevant information in the API specifications (such as endpoint descriptions, schemas, ...) in docs/api

Integration Tests

@adamcfraser adamcfraser merged commit 6abfd62 into master Apr 24, 2023
@adamcfraser adamcfraser deleted the CBG-2877 branch April 24, 2023 23:18
torcolvin added a commit that referenced this pull request May 31, 2023
* CBG-2877 allow options to contain db-scoped CORS

* Use pathVars from router.Match to determine keyspace

---------

Co-authored-by: adamcfraser <[email protected]>
adamcfraser added a commit that referenced this pull request May 31, 2023
… DB basis (#6277)

* CBG-2807: Allow databases to override CORS config (#6179)

* Don't set db headers unless we auth to DB
* Disallow setting max_age on database

* CBG-2877 allow options to contain db-scoped CORS (#6205)

* CBG-2877 allow options to contain db-scoped CORS

* Use pathVars from router.Match to determine keyspace

---------

Co-authored-by: adamcfraser <[email protected]>

---------

Co-authored-by: adamcfraser <[email protected]>
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.

2 participants