일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 | 31 |
- restapi
- Spring
- 데이터베이스
- java
- React
- sql
- springboot
- 쿼리
- 개발
- jdk
- reactjs
- 자바
- EXTJS
- mssql
- JS
- 보안취약점
- 스프링
- 리액트
- table
- 스프링부트
- Vue
- GIT
- component
- 개발공부
- Intellij
- 자바스크립트
- crud
- 컴포넌트
- DATABASE
- javascript
- Today
- Total
준준의 기록일지
[Heroku] CORS Policy?? No, It was about Application.yml doesn't upload or set heroku config in Heroku 본문
[Heroku] CORS Policy?? No, It was about Application.yml doesn't upload or set heroku config in Heroku
junjunwon 2022. 5. 3. 20:52"이 포스팅은 쿠팡 파트너스 활동의 일환으로, 이에 따른 일정액의 수수료를 제공받습니다."
Hi, Today we are going to talk about how to upload or set configuration of application.yml to Heroku.
my application as backend(springboot) and frontend (vue.js) was working properly in local.
But, I got into a trouble that when I deploy on Heroku my backend application.
It kept occurring CORS Policy Problem on Network of Chrome DevTool.
So, I tried to figure out Spring security to solve Cors policy probs. However It didn't work.
So, I check heroku logs --tail
code : heroku logs --tail (Terminal)
Then, I realized It wasn't about Cors policy. Maybe it was occured because heroku didn't know about my all of information in application.yml because I put this file in gitignore!!
So, I looked into this.
they said I need to set heroku config. So, I set all of my application.yml information in heroku dashboard
You can check these out below
I put same path on heroku config vars just like application.yml.
and IT WORKS!
I put some keys like "AWS_ACCESSKEY" it is for the situation when you want to get rid of application.yml from gitignore and push this to github and heroku. you can put
cloud.aws.credentials.accesskey : ${AWS_ACCESSKEY} |
So your information in application.yml will be secured!!! even if you upload your application.yml.
references :
https://devcenter.heroku.com/articles/preparing-a-spring-boot-app-for-production-on-heroku