diff --git a/modules/cookies/cookiemonster.c b/modules/cookies/cookiemonster.c index fd9c35e054d714813ddf2f249c2773545bcba076..56913d54a619946dfe20b0d18242a3c5f9af8b3e 100644 --- a/modules/cookies/cookiemonster.c +++ b/modules/cookies/cookiemonster.c @@ -361,6 +361,11 @@ int check_request(knot_layer_t *ctx, void *module_param) if (!srvr_sett->enabled) { /* TODO -- IS there a way how to determine whether the original * request came via TCP? */ + if (knot_pkt_has_edns(answer)) { + /* Delete any cookies. */ + knot_edns_remove_options(answer->opt_rr, + KNOT_EDNS_OPTION_COOKIE); + } return ctx->state; }