Uploaded image for project: 'ZK'
  1. ZK
  2. ZK-4175

replace XHR with the fetch() API to allow SSO redirect handling

XMLWordPrintable

    • Icon: New Feature New Feature
    • Resolution: Done
    • Icon: Later Later
    • 9.5.0
    • 8.6.0.1
    • ZK Client Engine
    • Security Level: Jimmy
    • None
    • modern browsers

    • ZK 9.0.0 S0

      SSO redirects (302) pose a common recurring issue when SSO filters intercept ZK's AJAX requests.

      While the XMLHttpRequest (XHR) API doesn't provide a mechanism to handle redirects at client side, the modern fetch API does ->
      https://fetch.spec.whatwg.org/#concept-request-redirect-mode describes that redirects can be treated like *error*s or handled *manual*ly at client side

      Replacing the older XHR with the new fetch() (or a polyfill) would open a way for more intuitive way when dealing with SSO solutions (at least for modern browsers)

      NOTE: the API is still marked as experimental (2018-12) so we should observe this API and decide when to integrate it (or use a polyfill as a fallback)

      https://developer.mozilla.org/en-US/docs/Web/API/WindowOrWorkerGlobalScope/fetch
      https://caniuse.com/#feat=fetch

            Leon03 Leon03
            cor3000 cor3000
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 4 days
                4d
                Remaining:
                Remaining Estimate - 4 days
                4d
                Logged:
                Time Spent - Not Specified
                Not Specified