New KOBI documentation is available: https://adeo-ccdp.gitbook.io/kobi/

If Gluer did not find any application matching with incoming request, it will try a resource resolution then will forward the request to the first matching backend in the Site configuration.

A Site configuration (from Registry) should contain a list of backend-rules which are matching criterias to route to a Backend application.

Resource resolution

Before forwarding the request to a backend, Gluer will try to find a resource matching with the incoming path.

Path resolution should result in the following cases

Status 200, resource found

If a resource was found by url resolution, Gluer will find the first configured backend rule matching depending host-pattern, path-pattern, handle-resource-types and handle-resource-status.

  • host-pattern must match with the input domain name
  • path-pattern must match with the path
  • handle-resource-types must be missing (not configured) or containing resource type resolved by url resolution
  • handle-resource-status must be missing (not configured) or containing status 200 resolved by url resolution

Request will be forwarded to the first backend matching the four criterias.

Status 301 or 302, resource found but must be accessed with an other path.

If resource resolution result in a redirect 301 or 302, Gluer will immediately send a redirect to the client and will not forward the request to a backend.

Status 404 or 410, resource not found or gone

If resource resolution result in a not found or gone resource, Gluer will find the first configured backend rule matching depending host-pattern, path-pattern and handle-resource-status.

  • host-pattern must match with the input domain name
  • path-pattern must match with the path
  • handle-resource-status must be missing (not configured) or containing status 404 (or 410) resolved by url resolution

Even if resource resolution result in a not found or gone resource, request is sent to a backend, usualy Shaper Web, that is able to identify the Page configured with the Designer to display a dynamic error page. For instance, this will allow you to include header and footer in your page.

404 status is usefull to route path not managed by KOBI to your legacy site, than you will be able to make transition from your legacy to KOBI without “Big Bang”. Once your legacy site is dead, you can route 404 status to Shaper Web.

Status 500, error while resolving resource

If resource resolution result in an error (resource resolution has failed due to technical problem), Gluer will send to the client the error 500 page configured for the current site.

Backend request

When a backend is identified, Gluer will build the proxy request depending on url of the chosen application version for this backend rule and the path from the incoming request.

It will then forward incoming headers except Host, Connection and Accept-Encoding headers and send some other headers

  • Host header with
    • Domain name from src in configuration if use-host-header is missing or set as false (Cloud configuration with an haproxy)
    • Domain name from incoming request if use-host-header is set as true (Direct host configuration)
  • X-Forwarded-Proto sheme of the incoming request (http or https)
  • X-Forwarded-Host domain name from incoming request
  • X-Kobi-Device the device id identified by Gluer
  • X-Kobi-Site-Id the site id identified by Gluer
  • X-Kobi-Site-App-Url the base url of the micro application handling site templates
  • X-Kobi-Navigation-Mode the navigation mode LIVE, EDIT or PREVIEW (EDIT and PREVIEW are used with KOBI Designer)
  • X-Kobi-Preview-Mode the preview mode LIVE or DRAFT for preview with KOBI Designer
  • X-Kobi-Preview-Date the preview date for preview with KOBI Designer
  • X-Kobi-Page-Variation-Id the page variation to edit with KOBI Designer
  • X-Kobi-Page-Model-Id the page model to edit with KOBI Designer
  • X-Kobi-Resource-Status the status from url resolution
  • X-Kobi-Resource-Type the resource type from url resolution
  • X-Kobi-Resource-Id the resource id from url resolution
  • X-Kobi-Resource-Scope the resource scope from url resolution
  • X-Kobi-Resource-Path the path of the resource (may be different from the input path if an internal redirect is done by url resolution, should be used as canonical path).
  • X-CSRF-TOKEN the CSRF token if CSRF is implemented
  • X-Kobi-Application-Context the application context, only in application mode
  • Via: Kobi Gluer a fixed header
  • Connection: keep-alive a fixed header to keep alive connections