- buyModal?.open(type, { 'Price': price, 'Buy': buy, 'Sell': sell })" @sell="type => sellModal?.open(type)" />
+ buyModal?.open(type, { 'Price': price, 'Buy': buy, 'Sell': sell })" @sell="type => sellModal?.open(type)" />
diff --git a/src/pages/market/Scan.vue b/src/pages/market/Scan.vue
index 2c5e2fb..b58efe6 100644
--- a/src/pages/market/Scan.vue
+++ b/src/pages/market/Scan.vue
@@ -1,7 +1,7 @@
diff --git a/vite.config.ts b/vite.config.ts
index 2cbdca6..3454d58 100644
--- a/vite.config.ts
+++ b/vite.config.ts
@@ -1,13 +1,16 @@
import vue from '@vitejs/plugin-vue';
import * as path from "path";
import { defineConfig, loadEnv } from 'vite';
-import zlib from 'zlib';
+import runtimeEnv from 'vite-plugin-runtime-env';
export default defineConfig(({ mode }) => {
const env = loadEnv(mode, process.cwd(), '');
return {
- plugins: [vue()],
+ plugins: [
+ runtimeEnv(),
+ vue(),
+ ],
resolve: {
alias: {
'src': path.resolve(__dirname, './src/'),
@@ -21,74 +24,6 @@ export default defineConfig(({ mode }) => {
watch: {
usePolling: true
},
- proxy: {
- '/marbas/': {
- target: env.MARBAS_URL,
- changeOrigin: true,
- followRedirects: true,
- rewrite: path => path.replace(/^\/marbas/, ''),
- selfHandleResponse: true,
- configure: proxy => {
- proxy.on('proxyRes', (proxyRes, req, res) => {
- const chunks = [];
-
- proxyRes.on("data", (chunk) => chunks.push(chunk));
- proxyRes.on("end", () => {
- const buffer = Buffer.concat(chunks);
- const encoding = proxyRes.headers["content-encoding"];
- const relace = (b: Buffer) => {
- let remoteBody = b.toString();
- const modifiedBody = remoteBody.replace(env.MARBAS_URL, '/marbas/');
-
- res.write(modifiedBody);
- res.end();
- }
-
- if (!encoding) {
- relace(buffer);
- } else if (encoding === "gzip" || encoding === "deflate") {
- zlib.unzip(buffer, (err, b) => {
- if (!err) {
- relace(b);
- } else {
- console.error(err);
- }
- });
- } else {
- console.error(`Unsupported encoding: ${encoding}`);
- }
- });
- });
- }
- },
- '/pocketbase/': {
- target: env.POCKET_BASE_URL,
- changeOrigin: true,
- followRedirects: true,
- rewrite: path => path.replace(/^\/pocketbase/, ''),
- },
- '/evepraisal/': {
- target: env.EVEPRAISAL_URL,
- changeOrigin: true,
- followRedirects: true,
- rewrite: path => path.replace(/^\/evepraisal/, ''),
- },
- '/fuzzwork/': {
- target: env.FUZZWORK_URL,
- changeOrigin: true,
- followRedirects: true,
- rewrite: path => path.replace(/^\/fuzzwork/, ''),
- },
- '/esi/': {
- target: env.ESI_URL,
- changeOrigin: true,
- followRedirects: true,
- rewrite: path => path.replace(/^\/esi/, ''),
- headers: {
- 'User-Agent': env.ESI_USER_AGENT
- },
- }
- }
}
};
})