You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Some background: The request target in an HTTP request to a server should start with a slash. Some servers may accept requests without the leading slash (interpreting it as if the path started with a slash), but this is non-standard behavior. As it happens, the core of elasticsearch is one server that does this. So when you run the example from your readme, with a PUT _template/my_template resource, this will work fine in a local development environment, with a local elasticsearch cluster, or one spun up from docker. However, once you try the same on a more involved infrastructure, such as an elastic.co managed cloud deployment on GCP, there are load-balancers and/or proxies in front of elasticsearch, that will reject the same resource with a 400 (Bad Request) response. I know, because I just spend a full day debugging why our deployments stopped working once going to an acceptance environment. And it's not just stupid me: this never resolved issue #287 has the same cause: omitting the leading slash from the pathname.
So I suggest to change the examples in your documentation to include the leading slash. In your README.md that means changing PUT _template/my_template into PUT /_template/my_template. It may prevent some users from stumbling into this issue when they follow the documented instructions.
In addition you might just want to silently add the leading slash when they are omitted in (some) script files.
The text was updated successfully, but these errors were encountered:
Some background: The request target in an HTTP request to a server should start with a slash. Some servers may accept requests without the leading slash (interpreting it as if the path started with a slash), but this is non-standard behavior. As it happens, the core of elasticsearch is one server that does this. So when you run the example from your readme, with a
PUT _template/my_template
resource, this will work fine in a local development environment, with a local elasticsearch cluster, or one spun up from docker. However, once you try the same on a more involved infrastructure, such as an elastic.co managed cloud deployment on GCP, there are load-balancers and/or proxies in front of elasticsearch, that will reject the same resource with a 400 (Bad Request) response. I know, because I just spend a full day debugging why our deployments stopped working once going to an acceptance environment. And it's not just stupid me: this never resolved issue #287 has the same cause: omitting the leading slash from the pathname.So I suggest to change the examples in your documentation to include the leading slash. In your README.md that means changing
PUT _template/my_template
intoPUT /_template/my_template
. It may prevent some users from stumbling into this issue when they follow the documented instructions.In addition you might just want to silently add the leading slash when they are omitted in (some) script files.
The text was updated successfully, but these errors were encountered: