diff --git a/CHANGELOG.md b/CHANGELOG.md
index d7a6de16..bd324b81 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -13,7 +13,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Add Report show page and link Moderation log references to the respective reports
- Add Unconfimed filter for Users table
- Filter users by actor type: Person, Bot or Application
-- Add ability to configure Media Preview Proxy, User Backup and Websocket based federation settings
+- Add ability to configure Media Preview Proxy, User Backup, Websocket based federation and Pleroma.Web.Endpoint.MetricsExporter settings
- Mobile and Tablet UI for Single Report show page
### Changed
@@ -21,6 +21,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Move `:restrict_unauthenticated` settings from Authentication tab to Instance tab
- Replace regular inputs with textareas for setting welcome messages in the Settings section
- Update rendering Moderation Log Messages so that all usernames are links to the pages of the corresponding users in Admin-FE
+- Remove Websocket based federation settings
### Fixed
diff --git a/src/store/modules/normalizers.js b/src/store/modules/normalizers.js
index e647a4a7..150865d0 100644
--- a/src/store/modules/normalizers.js
+++ b/src/store/modules/normalizers.js
@@ -57,10 +57,18 @@ export const parseNonTuples = (key, value) => {
// REFACTOR
export const parseTuples = (tuples, key) => {
return tuples.reduce((accum, item) => {
- if (key === ':rate_limit') {
- accum[item.tuple[0]] = Array.isArray(item.tuple[1])
- ? item.tuple[1].map(el => el.tuple)
- : item.tuple[1].tuple
+ if (key === ':rate_limit' ||
+ (key === 'Pleroma.Web.Endpoint.MetricsExporter' && item.tuple[0] === ':auth')) {
+ const getValue = () => {
+ if (typeof item.tuple[1] === 'boolean') {
+ return item.tuple[1]
+ } else if (Array.isArray(item.tuple[1])) {
+ return item.tuple[1].map(el => el.tuple)
+ } else {
+ return item.tuple[1].tuple
+ }
+ }
+ accum[item.tuple[0]] = getValue()
} else if (item.tuple[0] === ':mascots') {
accum[item.tuple[0]] = item.tuple[1].reduce((acc, mascot) => {
return [...acc, { [mascot.tuple[0]]: { ...mascot.tuple[1], id: `f${(~~(Math.random() * 1e8)).toString(16)}` }}]
@@ -92,6 +100,8 @@ export const parseTuples = (tuples, key) => {
accum[item.tuple[0]] = parseStringOrTupleValue(item.tuple[0], item.tuple[1])
} else if (item.tuple[0] === ':args') {
accum[item.tuple[0]] = parseNonTuples(item.tuple[0], item.tuple[1])
+ } else if (item.tuple[0] === ':ip_whitelist') {
+ accum[item.tuple[0]] = item.tuple[1].map(ip => typeof ip === 'string' ? ip : ip.tuple.join('.'))
} else if (Array.isArray(item.tuple[1]) &&
(typeof item.tuple[1][0] === 'object' && !Array.isArray(item.tuple[1][0])) && item.tuple[1][0]['tuple']) {
accum[item.tuple[0]] = parseTuples(item.tuple[1], item.tuple[0])
@@ -237,8 +247,9 @@ const wrapValues = (settings, currentState) => {
return { 'tuple': [setting, wrapValues(value, currentState)] }
} else if (prependWithСolon(type, value)) {
return { 'tuple': [setting, `:${value}`] }
- } else if (type.includes('tuple') && (type.includes('string') || type.includes('atom'))) {
- return typeof value === 'string'
+ } else if (type.includes('tuple') &&
+ (type.includes('string') || type.includes('atom') || type.includes('boolean'))) {
+ return typeof value === 'string' || typeof value === 'boolean'
? { 'tuple': [setting, value] }
: { 'tuple': [setting, { 'tuple': value }] }
} else if (type === 'reversed_tuple') {
diff --git a/src/views/settings/components/Http.vue b/src/views/settings/components/Http.vue
index 7b82537e..8aa8a23b 100644
--- a/src/views/settings/components/Http.vue
+++ b/src/views/settings/components/Http.vue
@@ -11,14 +11,10 @@