replace splitbee and panelbear with fathom

This commit is contained in:
m5r
2022-07-02 01:49:12 +02:00
parent 06f0078dfd
commit a8491e28a5
13 changed files with 76 additions and 87 deletions

View File

@ -1,14 +0,0 @@
import type { ActionFunction } from "remix";
async function proxyHive(request: Request) {
const url = new URL(request.url);
const req = new Request("https://hive.splitbee.io" + url.pathname.replace("/_hive", ""), {
...request,
signal: null,
});
req.headers.set("x-country", request.headers.get("cf-ipcountry")!);
req.headers.set("x-real-ip", request.headers.get("x-real-ip")!);
return fetch(req);
}
export const action: ActionFunction = ({ request }) => proxyHive(request);

View File

@ -1,3 +0,0 @@
import type { LoaderFunction } from "remix";
export const loader: LoaderFunction = () => fetch("https://cdn.panelbear.com/analytics.js");

View File

@ -1,3 +0,0 @@
import type { LoaderFunction } from "remix";
export const loader: LoaderFunction = () => fetch("https://cdn.splitbee.io/sb.js");