Skip to content

Host routing pattern not match when host contains port  #3036

@ashraf-revo

Description

@ashraf-revo

Describe the bug
Host routing pattern not match when host contains port
if you are running server behind a port like 8080 and

when you hit browser for gateway.lcl:8080 this will not match a pattern gateway.lcl

spring:
  cloud:
    gateway:
      routes:
        - id: gateway
          uri: https://example.org
          predicates:
            - Host= gateway.lcl

Sample
i created this repo to simulate the error and how to fix it in this url https://github.com/ashraf-revo/gateway-error/tree/issue-host-name
.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions