Remove backend-uri from all the codebase.

This commit is contained in:
Andrey Antukh 2020-06-03 10:50:05 +02:00
parent e1ae3da41e
commit 9901f0a52b
11 changed files with 27 additions and 33 deletions

View file

@ -5,18 +5,18 @@
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2017-2020 Andrey Antukh <niwi@niwi.nz>
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.config
"A configuration management."
(:require
[clojure.tools.logging :as log]
[clojure.spec.alpha :as s]
[uxbox.common.spec :as us]
[clojure.tools.logging :as log]
[cuerdas.core :as str]
[environ.core :refer [env]]
[mount.core :refer [defstate]]
[uxbox.common.exceptions :as ex]
[uxbox.common.spec :as us]
[uxbox.util.time :as tm]))
(def defaults
@ -26,14 +26,13 @@
:database-username "uxbox"
:database-password "uxbox"
:public-uri "http://localhost:3449"
:backend-uri "http://localhost:6060"
:redis-uri "redis://redis/0"
:media-directory "resources/public/media"
:assets-directory "resources/public/static"
:media-uri "http://localhost:6060/media"
:assets-uri "http://localhost:6060/static"
:public-uri "http://localhost:3449/"
:redis-uri "redis://redis/0"
:media-uri "http://localhost:3449/media/"
:assets-uri "http://localhost:3449/static/"
:sendmail-backend "console"
:sendmail-reply-to "no-reply@example.com"

View file

@ -2,7 +2,10 @@
;; License, v. 2.0. If a copy of the MPL was not distributed with this
;; file, You can obtain one at http://mozilla.org/MPL/2.0/.
;;
;; Copyright (c) 2019 Andrey Antukh <niwi@niwi.nz>
;; This Source Code Form is "Incompatible With Secondary Licenses", as
;; defined by the Mozilla Public License, v. 2.0.
;;
;; Copyright (c) 2020 UXBOX Labs SL
(ns uxbox.http.auth.google
(:require
@ -27,7 +30,7 @@
(defn- build-redirect-url
[]
(let [public (uri/uri (:backend-uri cfg/config))]
(let [public (uri/uri (:public-uri cfg/config))]
(str (assoc public :path "/api/oauth/google/callback"))))
(defn- get-access-token