CAM-11734 - make parsing of auhtorized engine header more robust #181
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Due to our company's operation guidelines we need to deploy camunda to a predefined context path that looks like this:
example.com/some/path/app/
. Since camunda is adding another/app/
itself, the wrong engine name is parsed. As a consequence we get a wrongX-Authorized-Engine
header and cannot use the features that require a license key.In our example we have
example.com/some/path/app/app/welcome/default/#!/login
aswindow.location.href
. The parser would take the second path segment after the first occurence ofapp
which in our case would bewelcome
. But what we need is the engine namedefault
. I changed the regular expression such that the parsing picks the last occurence ofapp
using negative lookahead.