Skip to content

Commit

Permalink
feat: support pingap accept encoding adjustment plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
vicanso committed Nov 17, 2024
1 parent 025031e commit 22ab2fc
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
12 changes: 12 additions & 0 deletions src/plugin/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,18 @@ remark = "Get stats of server"
r###"
category = "request_id"
remark = "Generate a request id for service"
"###,
)
.unwrap(),
),
(
"pingap:acceptEncodingAdjustment".to_string(),
toml::from_str::<PluginConf>(
r###"
category = "accept_encoding"
encodings = "zstd, br, gzip"
only_one_encoding = true
remark = "Adjust the accept encoding order and choose one econding"
"###,
)
.unwrap(),
Expand Down
8 changes: 7 additions & 1 deletion web/src/pages/Locations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,13 @@ export default function Locations() {
};

const plugins = newStringOptions(
["pingap:stats", "pingap:compression", "pingap:requestId", "pingap:ping"],
[
"pingap:stats",
"pingap:compression",
"pingap:requestId",
"pingap:ping",
"pingap:acceptEncodingAdjustment",
],
false,
);

Expand Down

0 comments on commit 22ab2fc

Please sign in to comment.