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

GRPC: Routing rewrite upstream and GRPC one was not used. #1177

Merged
merged 1 commit into from
Mar 9, 2020

Conversation

eloycoto
Copy link
Contributor

@eloycoto eloycoto commented Mar 9, 2020

This is a fix for GRPC when routing policy is used, where it uses the
old http1 endpoint.

Sample Config

"policy_chain": [
  {
    "name": "routing",
    "version": "builtin",
    "enabled": true,
    "configuration": {
      "rules": [
        {
          "url": "https://home-ip.acalustra.com:8080/",
          "owner_id": 3,
          "owner_type": "BackendApi",
          "condition": {
            "operations": [
              {
                "match": "path",
                "op": "matches",
                "value": "/default/.*|/default/?"
              }
            ]
          },
          "replace_path": "{{original_request.path | remove_first: '/default'}}"
        }
      ]
    }
  },
  {
    "name": "grpc",
    "version": "builtin",
    "configuration": {}
  },
  {
    "name": "apicast.policy.apicast"
  }
]

Fix THREESCALE-4684

Signed-off-by: Eloy Coto [email protected]

@eloycoto eloycoto requested a review from a team as a code owner March 9, 2020 16:34
@eloycoto eloycoto force-pushed the FixHTTP2 branch 2 times, most recently from 57fa82d to 974c44c Compare March 9, 2020 16:59
This is a fix for GRPC when routing policy is used, where it uses the
old http1 endpoint.

Sample Config
```
"policy_chain": [
  {
    "name": "routing",
    "version": "builtin",
    "enabled": true,
    "configuration": {
      "rules": [
        {
          "url": "https://home-ip.acalustra.com:8080/",
          "owner_id": 3,
          "owner_type": "BackendApi",
          "condition": {
            "operations": [
              {
                "match": "path",
                "op": "matches",
                "value": "/default/.*|/default/?"
              }
            ]
          },
          "replace_path": "{{original_request.path | remove_first: '/default'}}"
        }
      ]
    }
  },
  {
    "name": "grpc",
    "version": "builtin",
    "configuration": {}
  },
  {
    "name": "apicast.policy.apicast"
  }
]
```

Fix THREESCALE-4684

Signed-off-by: Eloy Coto <[email protected]>
@eloycoto eloycoto merged commit a17158a into 3scale:master Mar 9, 2020
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