Bad Request This combination of host and port requires TLS.
See original GitHub issueDescribe the bug
I am using spring-cloud-gcp-starter
with custom domain + custom certificate(not google managed).
Although the configuration in app.yaml
works fine but at the backend the redirection doesn’t work as intended as I am seeing the error:-
Bad Request This combination of host and port requires TLS.
on a HTTPS connection.
This is my app.yaml
runtime: java11
instance_class: F2
handlers:
- url: /.*
script: auto
secure: always
redirect_http_response_code: 301
And the related application.properties
server.ssl.enabled=true
server.ssl.protocol=TLS
server.port=${PORT:8080}
server.ssl.client-auth=none
server.ssl.key-store=classpath:data/someKeystore.p12
server.ssl.key-store-password=somePassword
server.ssl.key-store-type=PKCS12
server.ssl.key-alias=something
server.ssl.key-password=anotherpassword
Sample
I have tested the app locally, for some reason the redirection on localhost doesn’t work at all but if I add https
the request processes without the ‘Bad Request’ error.
To reproduce: Get a Cert from CA> Add it to GAE> Use the same cert to Configure Spring boot server for SSL> Deploy the app> See the error.
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (5 by maintainers)
Top Results From Across the Web
Bad Request - This combination of host and port requires TLS ...
I'm trying to make a https call to a service, I have a Privake key to secure connection. I hit: http://localhost:8081/points/12345/search. I ...
Read more >Bad request - This combination of host and port requires TLS.
I run my Unify Controller on an Azure windows vm (windows server 2012R2). The controller runs as a service. When I log into...
Read more >This combination of host and port requires TLS
Problem Description: If you are trying to log into TIBCO JasperReports ® Server via SSL and you believe you have configured the connector...
Read more >Bad Request This combination of host and port requires TLS.
Hi!I tried to use a self signed cert and after restarting SDP I received this error message:"Bad RequestThis combination of host and port...
Read more >Got "Bad Request This combination of host and port requires ...
We have started with ESP REST API STC with TLS configured. When access it thru web browser with HTTPS, we got error: Bad...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@Guneetgstar This is a great example of a very valuable community contribution! Hopefully, others will find this thread when they encounter the same problem before it’s fixed, and won’t have to spend time on it like you did. Thanks again!
Yeah this seems to me too as I have messed a whole day to find/fix this small requisite with no success and spent more time testing alternatives. What made me think that its rather a
spring-cloud-gcp
related issue is that I didn’t find a single issue regarding this with GAE and its been here for years whereasspring-cloud-gcp
has less users as compared to GAE itself which makes one not to expect a bug from GAE at least.I have filed a bug on the link you given to issuetacker. I guess you can finally close it now.