fix: source map 禁用 + MD5 改 SHA256
①vite build sourcemap: false,防止源码泄露 ②tos_client.py 文件去重哈希从 MD5 改为 SHA256 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
9a6a8c964a
commit
493b30c6b9
@ -47,7 +47,7 @@ def upload_file(file_obj, folder='uploads'):
|
||||
content = file_obj.read()
|
||||
|
||||
# Use content hash as key for dedup
|
||||
content_hash = hashlib.md5(content).hexdigest()
|
||||
content_hash = hashlib.sha256(content).hexdigest()
|
||||
key = f'{folder}/{content_hash}.{ext}'
|
||||
url = f'{settings.TOS_CDN_DOMAIN}/{key}'
|
||||
|
||||
|
||||
@ -4,6 +4,9 @@ import react from '@vitejs/plugin-react'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [react()],
|
||||
build: {
|
||||
sourcemap: false,
|
||||
},
|
||||
server: {
|
||||
proxy: {
|
||||
'/api': {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user