feat: implement redirector api

This commit is contained in:
Steven
2023-06-23 10:03:47 +08:00
parent 2aae515544
commit 60da9b7e7b
6 changed files with 53 additions and 13 deletions

View File

@@ -31,7 +31,7 @@ const ShortcutListView: React.FC<Props> = (props: Props) => {
};
const handleCopyButtonClick = (shortcut: Shortcut) => {
copy(absolutifyLink(`/${shortcut.name}`));
copy(absolutifyLink(`/o/${shortcut.name}`));
toast.success("Shortcut link copied to clipboard.");
};

View File

@@ -1,5 +1,5 @@
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react-swc";
import { defineConfig } from "vite";
// https://vitejs.dev/config/
export default defineConfig({
@@ -12,6 +12,10 @@ export default defineConfig({
target: "http://localhost:8082/",
changeOrigin: true,
},
"/o": {
target: "http://localhost:8082/",
changeOrigin: true,
},
},
},
});