Bug 240477 - Feature Request: Regular Expression Groups in Request Override Redirects
Summary: Feature Request: Regular Expression Groups in Request Override Redirects
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Web Inspector (show other bugs)
Version: Safari Technology Preview
Hardware: Unspecified Unspecified
: P2 Enhancement
Assignee: Devin Rousso
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-05-16 14:06 PDT by Jack Wellborn
Modified: 2022-05-18 13:02 PDT (History)
2 users (show)

See Also:


Attachments
Mock up of what capture groups might look like in request overrides. (102.35 KB, image/png)
2022-05-16 14:06 PDT, Jack Wellborn
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jack Wellborn 2022-05-16 14:06:04 PDT
Created attachment 459452 [details]
Mock up of what capture groups might look like in request overrides.

Safari Technology Preview's Web Inspector offers "Request Local Overrides", which is particularly useful for routing production requests to a dev server for testing and debugging. This feature is great and almost allays my need to use Charles Proxy. One aspect that seems to be missing is that while you can use regular expression to override the headers on various matching requests (e.g. https://example.com/path.*), using them for redirection is hindered as there is no way to forward query strings that involve a unique IDs to the redirected host. I am thinking that supporting regular expression capture groups in the redirect might be a good solution, especially given regular expression is already being supported. If this is already supported, then I would request updating the documentation on the page below, which details the ability to use regular expressions in overrides, but not capture groups. Thank you. Ya'll are doing a great job.
Comment 1 Alexey Proskuryakov 2022-05-16 14:46:20 PDT
rdar://73779368
Comment 2 Devin Rousso 2022-05-18 01:06:52 PDT
Pull request: https://github.com/WebKit/WebKit/pull/715
Comment 3 EWS 2022-05-18 13:01:58 PDT
Committed r294427 (250709@main): <https://commits.webkit.org/250709@main>

Reviewed commits have been landed. Closing PR #715 and removing active labels.