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

How to add IgnorePatterns in spring cloud as zuul? #1243

Closed
xiaoshao opened this issue Aug 13, 2019 · 8 comments
Closed

How to add IgnorePatterns in spring cloud as zuul? #1243

xiaoshao opened this issue Aug 13, 2019 · 8 comments

Comments

@xiaoshao
Copy link

I found that how to ignore the service in issue 185. But I still want to know spring cloud gateway support IgnorePatterns or not? currently, I created a prefilter with implements WebFilter for every request. But I dont think it a good idea.

Do you have more suggestion about it?

@ryanjbaxter
Copy link
Contributor

Seems like that was answered here #185 (comment)

I am not sure what else to say

@xiaoshao
Copy link
Author

@ryanjbaxter I realized that the spring-cloud-gateway add the route definition explicitly, and not generate route definition automatically as zuul after I read the issue 185 again.

thanks @ryanjbaxter

@spencergibb
Copy link
Member

It certainly can generate route definitions automatically

@xiaoshao
Copy link
Author

@ryanjbaxter @spencergibb I totally missed your means. And @spencergibb missed my mind.

In the issue 185 , @spencergibb told me that, it don't need ignore service not do not need ignore pattern.

about reply from @ryanjbaxter

The gateway isnt proactive like Zuul is and automatically creates routes based on service discovery they have to be explicitly configured (as far as I know). Can you provide an example of where this would be necessary?

I missed the is and in The gateway isnt proactive like Zuul is and automatically creates routes based on service discovery they have to be explicitly configured (as far as I know) .

I think it should be and is.

Now I am still confused that why ignore pattern is not necessary for spring cloud gateway ?

I add spring actuator in the service, but these rest interface should not be available from gateway.

@ryanjbaxter
Copy link
Contributor

You can exclude services from being added as described here #185 (comment)

@xiaoshao
Copy link
Author

@ryanjbaxter I know how to exclude services. My question is how to exclude some rest interface.

Take an example,
In the service A, there is some rest interface for bussiness and some rest interface for management.
I just want to expose the bussiness interface but not expose management interface with gateway.

How to implement that in spring cloud gateway?

@tony-clarke-amdocs
Copy link
Contributor

I am not following. You control the predicate that will match the requests...so you just define the predicate in such a way so that the managmenent interface will not match any predicate.

@xiaoshao
Copy link
Author

@tony-clarke-amdocs I know your mind. But the bussiness rest interface is complex (because of a bad design). It is hard to clear all the bussiness rest interface. And the management interface is clear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants