Use NextJS middleware for proxying
This commit is contained in:
parent
4e4603bd71
commit
df9b8abf15
13 changed files with 154 additions and 94 deletions
|
|
@ -68,7 +68,6 @@ export const Question: FC<QuestionProps> = ({ question, answer }) => {
|
|||
</AccordionSummary>
|
||||
<AccordionDetails sx={{ border: 0 }}>
|
||||
<Box
|
||||
component="p"
|
||||
sx={{ ...p, p: 2, border: `1px solid ${lavender}`, borderRadius: 3 }}
|
||||
>
|
||||
<ReactMarkdown>{answer}</ReactMarkdown>
|
||||
|
|
|
|||
|
|
@ -2,17 +2,19 @@ module.exports = {
|
|||
publicRuntimeConfig: {
|
||||
embedded: Boolean(process.env.LINK_EMBEDDED),
|
||||
},
|
||||
basePath: "/proxy/leafcutter",
|
||||
assetPrefix: "/proxy/leafcutter",
|
||||
i18n: {
|
||||
locales: ["en", "fr"],
|
||||
defaultLocale: "en",
|
||||
},
|
||||
|
||||
rewrites: async () => ({
|
||||
/* rewrites: async () => ({
|
||||
fallback: [
|
||||
{
|
||||
source: "/:path*",
|
||||
destination: "/api/proxy/:path*",
|
||||
},
|
||||
],
|
||||
}),
|
||||
}) */
|
||||
};
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ const FAQ = () => {
|
|||
question: t("whatCanYouDoWithLeafcutterQuestion"),
|
||||
answer: t("whatCanYouDoWithLeafcutterAnswer"),
|
||||
},
|
||||
|
||||
{
|
||||
question: t("whereIsTheDataComingFromQuestion"),
|
||||
answer: t("whereIsTheDataComingFromAnswer"),
|
||||
|
|
@ -43,6 +44,7 @@ const FAQ = () => {
|
|||
question: t("howDoWeKeepTheDataSafeQuestion"),
|
||||
answer: t("howDoWeKeepTheDataSafeAnswer"),
|
||||
},
|
||||
|
||||
{
|
||||
question: t("howLongDoYouKeepTheDataQuestion"),
|
||||
answer: t("howLongDoYouKeepTheDataAnswer"),
|
||||
|
|
@ -94,7 +96,7 @@ const FAQ = () => {
|
|||
</Grid>
|
||||
</Grid>
|
||||
</PageHeader>
|
||||
{questions.map((q, index) => (
|
||||
{questions.map((q: any, index: number) => (
|
||||
<Question key={index} question={q.question} answer={q.answer} />
|
||||
))}
|
||||
</Layout>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue