mirror of
https://github.com/status-im/open-bounty.git
synced 2025-01-23 16:01:15 +00:00
Use /test URL prefix from CLJS when on testnet
* because we are not using a virtual host for the testnet instance, the client AJAX requests must prefix http path with '/test'
This commit is contained in:
parent
57f136bdb3
commit
3bb8219f49
@ -39,7 +39,7 @@
|
||||
|
||||
{% style "https://cdnjs.cloudflare.com/ajax/libs/semantic-ui/2.1.8/semantic.min.css" %}
|
||||
<link href="/css/style.css?v={{commiteth-version}}" rel="stylesheet" type="text/css" />
|
||||
<script type="text/javascript" src="/js/app.js?v={{commiteth-version}}"></script>
|
||||
<script type="text/javascript" src="{{root-path}}/js/app.js?v={{commiteth-version}}"></script>
|
||||
<script>
|
||||
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
|
||||
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
|
||||
|
@ -21,7 +21,8 @@
|
||||
:authorize-url (github/signup-authorize-url)
|
||||
:authorize-url-admin (github/admin-authorize-url)
|
||||
:commiteth-version version
|
||||
:on-testnet? (env :on-testnet)}))
|
||||
:on-testnet? (env :on-testnet)
|
||||
:root-path (if (env :on-testnet) "/test" "")}))
|
||||
|
||||
(defroutes home-routes
|
||||
(GET "/" {{user :identity} :session}
|
||||
|
@ -17,7 +17,10 @@
|
||||
|
||||
(reg-fx
|
||||
:http
|
||||
(fn [{:keys [method url on-success on-error finally params]}]
|
||||
(fn [{:keys [method url_ on-success on-error finally params]}]
|
||||
(let [url (if (config/on-testnet?)
|
||||
(str "/test" url_)
|
||||
url_)])
|
||||
(method url
|
||||
{:headers {"Accept" "application/transit+json"}
|
||||
:handler on-success
|
||||
|
Loading…
x
Reference in New Issue
Block a user