2021. 9. 22. 12:08γπ TIL
π μν©
heroku μ λ°°ν¬ν΄ λμ λ°μ΄ν°λ² μ΄μ€μ μ°κ²°νλ κ³Όμ μμ λ°μν μλ¬. κ°μΈ νλ‘μ νΈ λ°±μλμ λ°μ΄ν°λ² μ΄μ€λ₯Ό ν€λ‘μΏ μ λ°°ν¬μν€κ³ μ°λνλ€.
μ²μμ pg_hba.conf κ° λ¬Έμ μΈμ€ μμλλ°, ꡬκΈλ§μ ν΅ν΄μ ν΄κ²°ν λ°©λ²μΌλ‘ λͺ¨λ νΈμ€νΈμ ν¬νΈλ λ€ μ΄μ΄λμ μνμλ€.
pg_hba_conf νμΌμ μ¬λ λ°©λ²μ λ§₯λΆ κΈ°μ€μΌλ‘ μ΅μλ¨ λ£¨νΈμμ μλ λͺ λ Ήμ΄λ₯Ό μ λ ₯νλ€. μ΅μλ¨ λ£¨νΈλ usr μ΄ μ‘΄μ¬νλ 루νΈλ₯Ό λ§νλ€.
cd usr/local/var/postgres
μλ¬΄νΌ pg_hba.conf νμΌμμ μλν μ μλ λ°©λ²μ λͺ¨λ λμνμ§λ§ λμΌν μλ¬λ©μμ§λ§ λμλ€.
π SSL off
Why am I seeing connection errors for my Heroku Postgres database from an unexpected IP address? What are these unauthorized con
Why am I seeing connection errors for my Heroku Postgres database from an unexpected IP address? What are these unauthorized connection attempts? Issue I'm seeing failed connection attempts in my Heroku Postgres logs, but I'm not creating these connections
help.heroku.com
μ¬κΈ° λ§ν¬λ₯Ό 보면 μ ssl μλ¬κ° λ°μνλμ§ μμΈμ μ€λͺ ν΄μ€λ€.
μ°λ¦¬κ° ν΄μ€ κ²μ κ²°κ΅ SSL μ€μ μ λ³κ²½νλ κ²μΈλ°, typeormμ μ€μ ν ormconfig.json νμΌμμ SSL μ€μ μ μΆκ°ν΄μ€λ€.
β ormconfing.json
{
"type": "postgres",
...
// μ¬κΈ° μλλ₯Ό μΆκ°ν΄μ€λ€.
"ssl": {
"rejectUnauthorized": false
}
}
μ μ²λΌ μ½λλ₯Ό μμ νλ©΄ μΌμΆ ν΄κ²°λλ€.
ssl off μλ¬λ ν΄κ²°λμ§λ§ λ€λ₯Έ μλ¬κ° λ°μν μ λ μλ€.
λ§μ½ ν΄λΉ μλ¬λ©μμ§κ° relation ... already exists λΌλ©΄ ormconfig.json μμ synchronize μ€μ μ μΆκ°νμ¬ false κ°μ μ£Όλ©΄ λλ€.
'π TIL' μΉ΄ν κ³ λ¦¬μ λ€λ₯Έ κΈ
2109028 κ°λ°κΈ°λ‘: μμ¦ λλΌλ μ λ€ (0) | 2021.09.28 |
---|---|
210924 κ°λ°κΈ°λ‘: νμ΄μ¬ dictionary, get()μ μ¬μ©ν΄μΌνλ μ΄μ (0) | 2021.09.25 |
210918 κ°λ°κΈ°λ‘: netlify - μλ‘κ³ μΉ¨ μλ¬ (0) | 2021.09.18 |
210917 κ°λ°κΈ°λ‘: νμ΄μ¬ νλ ¬ μ ν (not numpy) (0) | 2021.09.18 |
210916 κ°λ°κΈ°λ‘: λ―Έλμ΄μΏΌλ¦¬ , λ°μν (0) | 2021.09.17 |