@Extension public class ReverseProxySetupMonitor extends AdministrativeMonitor
Have the JavaScript make an AJAX call, to which we respond with 302 redirect. If the reverse proxy
is done correctly, this will be handled by #doFoo()
, but otherwise we'll report that as an error.
Unfortunately, XmlHttpRequest
doesn't expose properties that allow the client-side JavaScript
to learn the details of the failure, so we have to make do with limited information.
ExtensionPoint.LegacyInstancesAreScopedToHudson
id
Constructor and Description |
---|
ReverseProxySetupMonitor() |
Modifier and Type | Method and Description |
---|---|
org.kohsuke.stapler.HttpResponse |
doAct(String no)
Depending on whether the user said "yes" or "no", send him to the right place.
|
org.kohsuke.stapler.HttpResponse |
doTest() |
void |
getTestForReverseProxySetup(String rest) |
boolean |
isActivated()
Returns true if this monitor is activated and
wants to produce a warning message.
|
all, disable, doDisable, getDisplayName, getSearchUrl, getUrl, isEnabled
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
public boolean isActivated()
AdministrativeMonitor
This method is called from the HTML rendering thread, so it should run efficiently.
isActivated
in class AdministrativeMonitor
public org.kohsuke.stapler.HttpResponse doTest()
public void getTestForReverseProxySetup(String rest)
public org.kohsuke.stapler.HttpResponse doAct(@QueryParameter String no) throws IOException
IOException
Copyright © 2016. All rights reserved.