From 329ee3860a64383613f511bb7df547d3e9e37f19 Mon Sep 17 00:00:00 2001 From: Seung Park Date: Thu, 21 Nov 2024 11:48:11 -0500 Subject: [PATCH 1/2] DOP-5194: update input font size for mobile (#1308) --- src/components/ActionBar/styles.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/ActionBar/styles.js b/src/components/ActionBar/styles.js index 1881e5c15..9486004ad 100644 --- a/src/components/ActionBar/styles.js +++ b/src/components/ActionBar/styles.js @@ -190,7 +190,9 @@ export const searchInputStyling = ({ mobileSearchActive }) => css` ${displayNone.onMedium}; @media ${theme.screenSize.upToMedium} { - font-size: ${theme.fontSize.default}; + input[type='search'] { + font-size: ${theme.fontSize.default}; + } } ${mobileSearchActive && From 8cf4a65ef23ecb777a20e698315feb9611c49ae7 Mon Sep 17 00:00:00 2001 From: rayangler <27821750+rayangler@users.noreply.github.com> Date: Thu, 21 Nov 2024 15:06:42 -0500 Subject: [PATCH 2/2] DOP-5189: Create Netlify function to proxy URL fetch (#1310) --- netlify/functions/fetch-url.js | 46 ++++++++++++++++++++++++++++++++++ 1 file changed, 46 insertions(+) create mode 100644 netlify/functions/fetch-url.js diff --git a/netlify/functions/fetch-url.js b/netlify/functions/fetch-url.js new file mode 100644 index 000000000..9163419c5 --- /dev/null +++ b/netlify/functions/fetch-url.js @@ -0,0 +1,46 @@ +import axios from 'axios'; + +async function handleURL({ url }) { + try { + const { data } = await axios.get(url, { + // Throws error whenever response status >= 400 + validateStatus: (status) => { + console.log(`Returning status ${status} for ${url}`); + return status < 400; + }, + }); + + return new Response(data, { + status: 200, + headers: { + 'Cache-Control': 'public, durable, max-age=300', + }, + }); + } catch (err) { + console.log({ err }); + + if (axios.isAxiosError(err) && err.response) { + return new Response(null, { status: err.response.status }); + } + return new Response(null, { status: 500 }); + } +} + +// This function exists only to help proxy URLs that were originally causing 403 errors, potentially due +// to IP addresses. (DOP-5189) +async function handler(req, context) { + const params = context.url.searchParams; + const url = params.get('url'); + + // Log to help keep track of requests + console.log({ req, context }); + + if (url) { + return handleURL({ url }); + } + + // Expected to only work when a url query param is defined + return new Response(null, { status: 400 }); +} + +export default handler;