diff --git a/docker/ssrf_proxy/squid.conf.template b/docker/ssrf_proxy/squid.conf.template index 256e669c8d..fbe9ebc448 100644 --- a/docker/ssrf_proxy/squid.conf.template +++ b/docker/ssrf_proxy/squid.conf.template @@ -28,6 +28,7 @@ http_access deny manager http_access allow localhost include /etc/squid/conf.d/*.conf http_access deny all +tcp_outgoing_address 0.0.0.0 ################################## Proxy Server ################################ http_port ${HTTP_PORT} diff --git a/web/eslint-suppressions.json b/web/eslint-suppressions.json index a645a408cf..04e8be3afd 100644 --- a/web/eslint-suppressions.json +++ b/web/eslint-suppressions.json @@ -9795,11 +9795,6 @@ "count": 6 } }, - "hooks/use-breakpoints.ts": { - "erasable-syntax-only/enums": { - "count": 1 - } - }, "hooks/use-format-time-from-now.spec.ts": { "regexp/no-dupe-disjunctions": { "count": 5 diff --git a/web/hooks/use-breakpoints.ts b/web/hooks/use-breakpoints.ts index e0bd45c01c..f31a335c5b 100644 --- a/web/hooks/use-breakpoints.ts +++ b/web/hooks/use-breakpoints.ts @@ -1,13 +1,15 @@ 'use client' import * as React from 'react' -export enum MediaType { - mobile = 'mobile', - tablet = 'tablet', - pc = 'pc', -} +export const MediaType = { + mobile: 'mobile', + tablet: 'tablet', + pc: 'pc', +} as const -const useBreakpoints = () => { +type MediaTypeValue = (typeof MediaType)[keyof typeof MediaType] + +const useBreakpoints = (): MediaTypeValue => { const [width, setWidth] = React.useState(globalThis.innerWidth) const media = (() => { if (width <= 640)