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

Enhancement - Default Port on URI #198

Closed
mncaribou opened this issue Feb 18, 2018 · 0 comments
Closed

Enhancement - Default Port on URI #198

mncaribou opened this issue Feb 18, 2018 · 0 comments
Milestone

Comments

@mncaribou
Copy link

mncaribou commented Feb 18, 2018

Feature request to default the right port on URIs specified in the route spec, otherwise throw an exception to avoid partial configuration issues.

Using Cloud BUILD-SNAPSHOT as of 2/17/2018
ext { springCloudVersion = 'Finchley.BUILD-SNAPSHOT' }

When specifying the routes off of the RouteLocatorBuilder, you have to remember to specify the port.

@Bean
public RouteLocator customRouteLocator(RouteLocatorBuilder rlb) {
	return rlb
		.routes()
		.route(spec -> spec
			.path("/google")
			.uri("https://www.google.com") // no port
		)
		.build();
}

Results in

2018-02-18 10:48:04.877 ERROR 6956 --- [ctor-http-nio-4] .a.w.r.e.DefaultErrorWebExceptionHandler : Failed to handle request [GET http://localhost:8080/google]

io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection timed out: no further information: www.google.com/216.58.192.228:8080

Changing the route to be
https://www.google.com:443

Gets it to work fine

@spencergibb spencergibb added this to the 2.0.0.M7 milestone Feb 20, 2018
Johnny850807 pushed a commit to Johnny850807/spring-cloud-gateway that referenced this issue Dec 14, 2020
…oud#198)

Add support for Composite Discovery client

* Test that the default discovery client is  present

* Return a local Service instance from Composite Discovery Client

fixes spring-cloudgh-140
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

2 participants