royallthefourth/domain-intercept

Intercept requests

royallthefourth opened this issue · 0 comments

When active, check for the current request's domain in the domain list. If present, replace it with whatever record is in the config.

  • onBeforeRequest: check for presence of requestDetails.url in storage.local
  • If present, add requestId: originalUrl pair to storage
  • Return object with redirectUrl
  • onBeforeSendHeaders: if requestId is present in storage, reset host header to value stored for this requestId