2024. 4. 26. 17:52

1. pip install django-cors-headers

 

2. settings.py 

 

INSTALLED_APPS = [

  'corsheaders'

]

 

3. MIDDLEWARE = [

  'corsheaders.middleware.CorsMiddleware', 

]

 

4. CORS_ALLOWED_ORIGINS = [

  'http://localhost:5173' # 보내는 클라이언트 주소

]

 

5. CORS_ALLOW_CREDENTIALS = True

 

 

2024. 4. 26. 14:18

 

pip install djangorestframework

pip install djangorestframework-simplejwt

2024. 4. 26. 14:16

html 주소 대신 ssh 주소를 사용하면 된다

 

대신 keygen 으로 ssh 퍼블릭 키를 추가하면 된다

 

1. ssh key 생성

 

ssh-keygen -t rsa -b 4096 -C "exam@gmail.com"

 

2. id_rsa 파일과 id_rsa.pub 파일 생성 확인

 

3. github - settings - SSH and GPG Key - New ssh key -

   id_rsa.pub 파일의 내용 복사 - 확인

 

4. .ssh 경로로 clone