# 2021.2월

# 2월 이슈 요약

  • 캐롯 랜딩 어드민 프로젝트 종료
  • 블로그 방문자 월 5500명 (GA 기준)
  • vue3 공부
  • nest 공부

# 에러 해결 모음

# express cors 허용했는데 cors 에러 뜨는 경우

  • front에서 쿠키를 주는 경우 서버에서 cors를 허용해줘도 아래와 같은 에러가 뜬다
xxx has been blocked by CORS policy: The value of the 'Access-Control-Allow-Origin' header in the response must not be the wildcard '*' when the request's credentials mode is 'include'. The credentials mode of requests initiated by the XMLHttpRequest is controlled by the withCredentials attribute.

아래와 같이 credentials: true를 추가하여 해결한다

const express = require("express");
const cors = require("cors");
const app = express();

var corsOptions = {
  origin: ["http://localhost:5000"],
  credentials: true
};

app.use(cors(corsOptions));

# 배운점

# vue3

# nest

<!-- The core Firebase JS SDK is always required and must be listed first -->
<script src="https://www.gstatic.com/firebasejs/8.2.9/firebase-app.js"></script>

<!-- TODO: Add SDKs for Firebase products that you want to use
     https://firebase.google.com/docs/web/setup#available-libraries -->
<script src="https://www.gstatic.com/firebasejs/8.2.9/firebase-analytics.js"></script>

<script>
  // Your web app's Firebase configuration
  // For Firebase JS SDK v7.20.0 and later, measurementId is optional
  var firebaseConfig = {
    apiKey: "AIzaSyBbpcePYPq4NbodO2TsQtb8cjVctb9pYz4",
    authDomain: "joshua-test-deb36.firebaseapp.com",
    projectId: "joshua-test-deb36",
    storageBucket: "joshua-test-deb36.appspot.com",
    messagingSenderId: "135986493087",
    appId: "1:135986493087:web:659749c64679b83bedd4aa",
    measurementId: "G-TF8L8M9EJB"
  };
  // Initialize Firebase
  firebase.initializeApp(firebaseConfig);
  firebase.analytics();
</script>
최근변경일: 3/25/2024, 12:16:11 PM