Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CORS #204

Merged
merged 2 commits into from
Feb 18, 2024
Merged

CORS #204

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,16 @@ const app = express();
app.set('port', process.env.PORT || 3000) // 서버 포트 지정




const corsOptions = {
origin: ["https://www.vi-no.site", "http://vi-no.site", "http://localhost:5173", "https://vi-no.site"],
origin: ["https://www.vi-no.site", "http://vi-no.site", "http://localhost:5173", "https://vi-no.site","*"],
optionsSuccessStatus: 200,
credentials: true,// 응답 헤더에 Access-Control-Allow-Credentials 추가
};

app.use(cors(corsOptions)); // 옵션을 추가한 CORS 미들웨어 추가

// cors 방식 허용
app.use(express.static('public')); // 정적 파일 접근
app.use(express.json()); // request의 본문을 json으로 해석할 수 있도록 함 (JSON 형태의 요청 body를 파싱하기 위함)
Expand Down
1 change: 0 additions & 1 deletion src/services/speech.service.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ export const recognizeFromObjectStorage = async (objectStorageDataKey, language
dataKey: objectStorageDataKey, // 인식을 원하는 파일의 ObjectStorage 경로에 접근하기 위한 Key
language,
completion: 'async',
callback: 'http://backend.vi-no.site/video/result', // 결과를 받을 콜백 URL, 필요하다면 제공
resultToObs: true, // 결과를 Object Storage에 저장할지 여부
noiseFiltering: true, // 노이즈 필터링 적용 여부
wordAlignment: true, // 단어 정렬 정보 포함 여부
Expand Down
Loading