refactor(odeme): update environment variable usage and documentation
All checks were successful
Deploy / deploy (push) Successful in 8m39s
All checks were successful
Deploy / deploy (push) Successful in 8m39s
Replaced `NEXT_PUBLIC_APP_URL` with `APP_URL` in the payment processing logic to ensure proper runtime access. Updated related documentation to clarify the distinction between build-time and runtime environment variables, emphasizing the importance of using `APP_URL` for callback and webhook URLs. Adjusted references in the codebase to reflect this change, enhancing clarity and functionality in the payment flow.
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
import { URUNLER } from "./credits";
|
||||
|
||||
/**
|
||||
* Kanonik site adresi. NEXT_PUBLIC_APP_URL bilinçli olarak KULLANILMAZ —
|
||||
* o değişken ödeme callback akışına ait ve .env.local'de localhost'a işaret
|
||||
* ediyor. .dockerignore .env* dosyalarını dışladığı için prod build burada
|
||||
* deterministik olarak kolaytercih.com'a düşer.
|
||||
* Kanonik site adresi. Ödeme akışının kök adresiyle (`appUrl()`,
|
||||
* src/lib/app-url.ts) karıştırılmamalı: o runtime'da okunur, bu ise metadata
|
||||
* için build anında sabitlenir. .dockerignore .env* dosyalarını dışladığı için
|
||||
* prod build burada deterministik olarak kolaytercih.com'a düşer.
|
||||
*/
|
||||
export const SITE_URL =
|
||||
process.env.NEXT_PUBLIC_SITE_URL ??
|
||||
|
||||
Reference in New Issue
Block a user