tyk icon indicating copy to clipboard operation
tyk copied to clipboard

fix: add authority header

Open vanhtuan0409 opened this issue 3 years ago • 0 comments

Description

Some GRPC servers will return PROTOCOL_ERROR when missing HTTP2 :authority header. Eg: https://www.npmjs.com/package/@grpc/grpc-js

Thus preventing custom GRPC plugins

Related Issue

https://github.com/TykTechnologies/tyk/issues/3082

Motivation and Context

Allow custom GRPC plugins to use the latest nodejs GRPC sdk

How This Has Been Tested

Added unit test

Screenshots (if appropriate)

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)
  • [ ] Refactoring or add test (improvements in base code or adds test coverage to functionality)

Checklist

  • [x] Make sure you are requesting to pull a topic/feature/bugfix branch (right side). If pulling from your own fork, don't request your master!
  • [x] Make sure you are making a pull request against the master branch (left side). Also, you should start your branch off our latest master.
  • [x] My change requires a change to the documentation.
    • [ ] If you've changed APIs, describe what needs to be updated in the documentation.
    • [ ] If new config option added, ensure that it can be set via ENV variable
  • [ ] I have updated the documentation accordingly.
  • [x] Modules and vendor dependencies have been updated; run go mod tidy && go mod vendor
  • [ ] When updating library version must provide reason/explanation for this update.
  • [x] I have added tests to cover my changes.
  • [ ] All new and existing tests passed.
  • [x] Check your code additions will not fail linting checks:
    • [x] go fmt -s
    • [x] go vet

vanhtuan0409 avatar Aug 08 '22 07:08 vanhtuan0409