8 months ago
FROM kong:latest
ENV KONGDATABASE=postgres ENV KONGPGHOST=autorack.proxy.rlwy.net ENV KONGPGPORT=59190 ENV KONGPGUSER=user ENV KONGPGPASSWORD=pssword ENV KONGPGDATABASE=railway ENV KONGPROXYACCESSLOG=/dev/stdout
ENV KONGADMINACCESSLOG=/dev/stdout ENV KONGPROXYERRORLOG=/dev/stderr
ENV KONGADMINERROR_LOG=/dev/stder
ENTRYPOINT ["/bin/sh", "-c", "set -e; kong migrations bootstrap; kong start && tail -f /dev/null"]
EXPOSE 8000 8443 8001 8444 8002 8445 8003 8004
using this docker file i have deployed Kong API Gateway on railway.app. And also i have deployed a test backend project. Then i have created Service and Route on Kong. below is the route configurations.
route json
{
"tags": [],
"methods": null,
"name": "yodirectroute",
"requestbuffering": true, "responsebuffering": true,
"strippath": true, "protocols": [ "http", "https" ], "pathhandling": "v0",
"regexpriority": 0, "headers": null, "hosts": null, "paths": [ "/yo" ], "service": { "id": "9c2a9507-83fa-487a-9559-4eb23b58dfc9" }, "id": "c4281174-c1a5-4420-993e-3c695f85a3f2", "preservehost": false,
"sources": null,
"httpsredirectstatus_code": 426,
"destinations": null,
"snis": null
}
Then i have try https://kong-dev.bitnomi.app/yo api and got correct response. Then i have change the route configuration to
"protocols": [
"http",
"https"
]
to
"protocols": [
"https"
]
Then i have try https://kong-dev.bitnomi.app/yo API and got below error.
{ "message": "Please use HTTPS protocol", "request_id": "f5a1af432973d870f3a5436c040ce52d" }
is this happening because of "Access your application over HTTP with the following domains" in this attachment? or is there anything i should know?
0 Replies