Uploaded image for project: 'Isis'
  1. Isis
  2. ISIS-1880

LocalResourcePath: new value type for local URLs

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.0-M1
    • Fix Version/s: 2.0.0-M1
    • Component/s: Isis Core
    • Labels:
      None

      Description

      The framework in prototyping mode (when rendering domain objects) provides links to swagger and the restful api.

      However, this links do not work in general.

      Currently these links are contributed by actions that return java.net.URL value types. Which works fine if we want to link to external web-resources. But when linking to internal web-resources its almost impossible to derive the absolute URL a client actually sees.

      E.g. we have the relative path to swagger: '/swagger-ui/index.html' but it's impossible to derive the absolute path in general like 'http://some-server:someport:/...'. Not to mention that the servlet container hosting Isis could sit behind a http-reverse-proxy, or that we don't know if the protocol is http or https (SSL could be terminated somewhere else).

      And I believe, we should not even have to care!

      So I'd propose, we introduce a new value type similar to URL, but one that only represents relative paths within the web-app.

      Feel free to comment, if I'm wrong our there is a better solution.

        Attachments

          Activity

            People

            • Assignee:
              hobrom Andi Huber
              Reporter:
              hobrom Andi Huber
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: