generated from template/astro-template
	fix: astro config for proxy
This commit is contained in:
		@@ -15,11 +15,7 @@ if (isDev && !isCNB) {
 | 
				
			|||||||
let target = process.env.VITE_API_URL || 'https://localhost:51015';
 | 
					let target = process.env.VITE_API_URL || 'https://localhost:51015';
 | 
				
			||||||
const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
 | 
					const apiProxy = { target: target, changeOrigin: true, ws: true, rewriteWsOrigin: true, secure: false, cookieDomainRewrite: 'localhost' };
 | 
				
			||||||
let proxy = {
 | 
					let proxy = {
 | 
				
			||||||
  '/root/center/': {
 | 
					  '/root/': {
 | 
				
			||||||
    target: `${target}`,
 | 
					 | 
				
			||||||
    secure: false,
 | 
					 | 
				
			||||||
  },
 | 
					 | 
				
			||||||
  '/root/resources/': {
 | 
					 | 
				
			||||||
    target: `${target}`,
 | 
					    target: `${target}`,
 | 
				
			||||||
    secure: false,
 | 
					    secure: false,
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -7,6 +7,13 @@ import { html2md } from '@kevisual/markdown-editor/tiptap/index.ts';
 | 
				
			|||||||
import { chatId } from '../ai-chat/utils/uuid';
 | 
					import { chatId } from '../ai-chat/utils/uuid';
 | 
				
			||||||
import '../ai-chat/index.css';
 | 
					import '../ai-chat/index.css';
 | 
				
			||||||
import { links } from './data/link.ts';
 | 
					import { links } from './data/link.ts';
 | 
				
			||||||
 | 
					// const testImport = async () => {
 | 
				
			||||||
 | 
					//   const link1 = 'https://kevisual.xiongxiao.me/root/ai/code/frontend-js/test.js';
 | 
				
			||||||
 | 
					//   const link2 = () => '/root/ai/code/frontend-js/test.js';
 | 
				
			||||||
 | 
					//   // @ts-ignore
 | 
				
			||||||
 | 
					//   const link = await import(link2());
 | 
				
			||||||
 | 
					//   console.log('testImport', link);
 | 
				
			||||||
 | 
					// };
 | 
				
			||||||
export const Editor = () => {
 | 
					export const Editor = () => {
 | 
				
			||||||
  const ref = useRef<HTMLDivElement>(null);
 | 
					  const ref = useRef<HTMLDivElement>(null);
 | 
				
			||||||
  const editorRef = useRef<TextEditor | null>(null);
 | 
					  const editorRef = useRef<TextEditor | null>(null);
 | 
				
			||||||
@@ -30,6 +37,10 @@ export const Editor = () => {
 | 
				
			|||||||
  );
 | 
					  );
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
export const App = (props: any) => {
 | 
					export const App = (props: any) => {
 | 
				
			||||||
 | 
					  useEffect(() => {
 | 
				
			||||||
 | 
					    // testImport();
 | 
				
			||||||
 | 
					    // console.log('chatId', chatId());
 | 
				
			||||||
 | 
					  }, []);
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <div className='w-full h-full flex flex-col'>
 | 
					    <div className='w-full h-full flex flex-col'>
 | 
				
			||||||
      <ShowLinks links={links} />
 | 
					      <ShowLinks links={links} />
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user