Skip to content

feat: Add sample using regex to rewrite a path#18

Merged
martijneken merged 7 commits intoGoogleCloudPlatform:mainfrom
martijneken:regex-rewrite
Aug 23, 2023
Merged

feat: Add sample using regex to rewrite a path#18
martijneken merged 7 commits intoGoogleCloudPlatform:mainfrom
martijneken:regex-rewrite

Conversation

@martijneken
Copy link
Collaborator

@martijneken martijneken commented Jul 26, 2023

In C++ we use RE2 and Abseil.
In Rust we use the regex crate.

This example removes part of the path, but any URI mutation is feasible (path, query, fragment, etc).

The C++ sample is excluded from the build until we resolve Emscripten blockers:
proxy-wasm/proxy-wasm-cpp-sdk#157
NOTE: leaving the code here because users can build the C++ plugin by using the PR above.

  • Tests pass
  • Appropriate changes to documentation are included in the PR

Signed-off-by: Martijn Stevenson <mstevenson@google.com>
In C++ we use RE2 and Abseil.
In Rust we use the regex crate.

This example removes part of the path, but any URI mutation is feasible (path, query, fragment, etc).

This depends on PR to add compile/link options in proxy-wasm-cpp-sdk.

Signed-off-by: Martijn Stevenson <mstevenson@google.com>
Signed-off-by: Martijn Stevenson <mstevenson@google.com>
@martijneken martijneken requested review from a team and upeeth as code owners July 26, 2023 06:34
@snippet-bot
Copy link

snippet-bot bot commented Jul 26, 2023

Here is the summary of changes.

You are about to add 2 region tags.

This comment is generated by snippet-bot.
If you find problems with this result, please file an issue at:
https://github.com/googleapis/repo-automation-bots/issues.
To update this comment, add snippet-bot:force-run label or use the checkbox below:

  • Refresh this comment

Signed-off-by: Martijn Stevenson <mstevenson@google.com>
Signed-off-by: Martijn Stevenson <mstevenson@google.com>
Signed-off-by: Martijn Stevenson <mstevenson@google.com>
@martijneken martijneken requested a review from leonm1 August 23, 2023 15:24
@leonm1
Copy link
Contributor

leonm1 commented Aug 23, 2023

Glad to see the tests in CI worked well!

Signed-off-by: Martijn Stevenson <mstevenson@google.com>
@martijneken martijneken merged commit b70e1dd into GoogleCloudPlatform:main Aug 23, 2023
@martijneken martijneken deleted the regex-rewrite branch October 25, 2023 17:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants