spring-cloud / spring-cloud/spring-cloud-gateway

Add "ignore path" option, to exclude path from routing

Open
#1,266 10 comments 22 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Java
Stars
4.9k
Forks
3.5k
Avg merge
20h 57m
Merged PRs (30d)
8

Description

Enhancement

Currently I see no way I can exclude particular path from routing. For instance if I want my gateway to expose some endpoints.

If I have the following route configuration (/** - matches everything):

- id: frontend
  uri: ${com.siemens.cms.gateway.routes.frontend}
  predicates:
   - Path=/**

I want to be able to do something like the following (make some exclusions):

- id: frontend
  uri: ${com.siemens.cms.gateway.routes.frontend}
  redicates:
  - Path=/**, except: /actuator/**

or

spring:
  cloud:
    gateway:
      routes:
      .....
      ignore:
          predicate:
         - Path=/actuator/**

I think it would be very convenient to have such option.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the Spring Cloud Gateway route configuration and the Path predicate examples in the issue. Determine how exclusions from a /** route should be represented, then verify that excluded paths such as /actuator/** are not forwarded while other paths still use the frontend route.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring, spring-boot
Domain
api, backend
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.