java.lang.Object | |
↳ | com.atlassian.bitbucket.web.conditions.BaseUrlMismatchCondition |
Verifies that the configured base URL is the one being used to access the instance.
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This condition compares the return values of
buildConfigured() and
buildAbsolute() . |
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.atlassian.plugin.web.Condition
|
PluginParseException |
---|
This condition compares the return values of buildConfigured()
and
buildAbsolute()
. This works, because buildAbsolute uses the currently active request to
construct a URL, while buildConfigured uses the configured baseUrl.
Should these two not match, we can deduce that the user is accessing the instance from a URL that differs from
the configured baseUrl.
Should there not be an active request, buildAbsolute will fall back to using the configured baseUrl and this
function would evaluate to false
.