static int32_t RedirectRoot(OrthancPluginRestOutput* output, const char* url, const OrthancPluginHttpRequest* request) { if (request->method != OrthancPluginHttpMethod_Get) { OrthancPluginSendMethodNotAllowed(context, output, "GET"); } else { OrthancPluginRedirect(context, output, ORTHANC_PLUGIN_WEB_ROOT "index.html"); } return 0; }
void OrthancContext::Redirect(OrthancPluginRestOutput* output, const std::string& s) { Check(); OrthancPluginRedirect(context_, output, s.c_str()); }