Replies: 2 comments
-
|
Docusaurus is only responsible for building a static site, not for hosting it. It is not planned that we provide a first-class proxy feature. The solution you choose to host your site is likely to support it already (unless you use GitHub Pages which is quite limited). For example, if you use Netlify, you could write a Similarly you can do something equivalent with Vercel, using Self-hosting solutions (NGing, Apache...) probably support something similar too, read their doc to find out. For more advanced cases, you can also use an edge middleware and functions that will allow you to run some code before the CDN attempts to serve the static code. Technically you could register the link click in your database directly from the edge function, without even having to redirect to your backend. Vercel/Netlify/Cloudflare and probably others support this. Now, why do you need those links to be All this is not really related to Docusaurus. The same would apply if your site was just a handwritten |
Beta Was this translation helpful? Give feedback.
-
|
@chengtie Have you looked into UTM tags? E.g., via Google Analytics? Sounds like you'd like to track the performance of some of your links. That's what UTM tags are for AFAIK. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a website www.frontend.com. It uses facebook Docusaurus as frontend, and calls an external backend www.backend.com in nodejs and mongodb.
Now, I would like to enable links like
https://www.frontend.com/httpOnly/openlink?useId=abcdefg&link=cn8b-tvv. When a user opens that link in a browser, it will write a record to the backend database to specify that the user clicked that link at what time, then be redirected tohttps://calendly.com/d/cn8b-tvv.I don't want to create a webpage on the www.frontend.com to do so, because that will display a webpage for a short period of time.
Does anyone know how to enable this? For instance, how to set up a proxy in Docusaurus to directly redirect
https://www.frontend.com/httpOnly/openlink?useId=abcdefg&link=cn8b-tvvtohttps://www.backend.com/httpOnly/openlink?useId=abcdefg&link=cn8b-tvvwhich will save the record and undertake the redirection?Beta Was this translation helpful? Give feedback.
All reactions