mirror of
https://gitee.com/dcren/initializr.git
synced 2025-12-26 22:25:51 +08:00
If an elastic instance is available, publish a document to a configurable index every time a `ProjectRequest` is handled by the service. In practice, this means that every attempt to generate a project leads to a new document in the index. The document gathers the settings of the required project, including invalid ones if any. If an exception is thrown, the message of the cause is made available. CloudFlare is explicitely supported and the IP and country of the request is added to the document. If that information is not available and the request contains a `X-Forwarded-For` header, the value is also associated with the document. If an IPv4 is detected, it is set in a separate `requestIpv4` property. If for some reason the document could not be indexed, we attempt to retry a configurable amount of times. Closes gh-185