Skip to content

feat: Add C++ Plugins - Set/re-set cookies#302

Open
victorwoli wants to merge 17 commits into
GoogleCloudPlatform:mainfrom
victorwoli:set-reset-cookies
Open

feat: Add C++ Plugins - Set/re-set cookies#302
victorwoli wants to merge 17 commits into
GoogleCloudPlatform:mainfrom
victorwoli:set-reset-cookies

Conversation

@victorwoli
Copy link
Copy Markdown
Contributor

This plugin lets you set, reset, or delete a domain cookie before the request reaches the Cloud/Media CDN cache. You can create session cookies or time-based cookies using Apache log format. If a cookie already exists from the origin, the plugin can overwrite it or remove the set-cookie header entirely.

@victorwoli victorwoli requested a review from a team as a code owner December 9, 2025 16:32
@snippet-bot
Copy link
Copy Markdown

snippet-bot Bot commented Dec 9, 2025

Here is the summary of changes.

You are about to add 1 region tag.

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

Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Comment thread plugins/samples/set_reset_cookie/tests.textpb Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
@mpwarres mpwarres self-assigned this Dec 17, 2025
Copy link
Copy Markdown
Collaborator

@mpwarres mpwarres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LG once comments addressed. Thanks!

Comment thread plugins/samples/set_reset_cookie/example_config.txtpb Outdated
Comment thread plugins/samples/set_reset_cookie/cookie_config.proto Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Comment thread plugins/samples/set_reset_cookie/plugin.cc Outdated
Copy link
Copy Markdown
Collaborator

@mpwarres mpwarres left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, thanks!

@mpwarres
Copy link
Copy Markdown
Collaborator

@victorwoli there look to be some build errors, can you take a look?

@mpwarres
Copy link
Copy Markdown
Collaborator

There is still a build error:

ERROR: /home/runner/work/service-extensions/service-extensions/plugins/samples/set_reset_cookie/BUILD:12:17: in deps attribute of proto_gen rule //samples/set_reset_cookie:cookie_config_cc_proto_genproto: rule '//samples/set_reset_cookie:cookie_config_proto_genproto' does not exist. Since this rule was created by the macro 'cc_proto_library', the error might have been caused by the macro implementation
ERROR: /home/runner/work/service-extensions/service-extensions/plugins/samples/set_reset_cookie/BUILD:12:17: Analysis of target '//samples/set_reset_cookie:cookie_config_cc_proto_genproto' failed

@pweiber
Copy link
Copy Markdown
Contributor

pweiber commented Mar 18, 2026

There is still a build error:

ERROR: /home/runner/work/service-extensions/service-extensions/plugins/samples/set_reset_cookie/BUILD:12:17: in deps attribute of proto_gen rule //samples/set_reset_cookie:cookie_config_cc_proto_genproto: rule '//samples/set_reset_cookie:cookie_config_proto_genproto' does not exist. Since this rule was created by the macro 'cc_proto_library', the error might have been caused by the macro implementation
ERROR: /home/runner/work/service-extensions/service-extensions/plugins/samples/set_reset_cookie/BUILD:12:17: Analysis of target '//samples/set_reset_cookie:cookie_config_cc_proto_genproto' failed

Hi @mpwarres I did some changes to the code and removed the proto config, decided to use the usual config files that we currently use in the repository, also did some changes to the overwrite part since I probably found a bug that it was wiping all the Set-Cookie headers, the build should be fine now, if we find any additional error we can fix that, let me know if the changes are ok, I'll update the rust and go version as well based on this

pweiber and others added 5 commits March 18, 2026 13:59
Signed-off-by: pweiber <periclesweiber@ciandt.com>
… use TextFormat::ParseFromString

Signed-off-by: pweiber <periclesweiber@ciandt.com>
Signed-off-by: pweiber <periclesweiber@ciandt.com>
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.

3 participants