fix: allowedHosts 설정 추가 및 모바일 QR 코드 스캔 시 줄바꿈/공백 정규식 정제 로직 적용

This commit is contained in:
이태훈
2026-06-23 17:15:48 +09:00
parent f36e8e93e2
commit 1eca0ede91
2 changed files with 5 additions and 1 deletions

View File

@@ -79,7 +79,10 @@ document.addEventListener('DOMContentLoaded', () => {
}
}
function processScannedCode(code: string) {
function processScannedCode(rawCode: string) {
// QR 코드 인쇄 폼 등으로 인한 개행 문자(\r, \n) 및 모든 공백 문자(\s)를 제거
const code = rawCode.replace(/[\r\n]/g, '').replace(/\s+/g, '').trim();
// 1. Check if the code is a physical location code
if (code.startsWith('LOC-')) {
sessionStorage.setItem(SESSION_LOC_KEY, code);

View File

@@ -9,6 +9,7 @@ export default defineConfig({
server: {
port: 8080,
host: true, // Listen on all local IPs
allowedHosts: true,
proxy: {
'/api': {
target: proxyTarget,