Move api and static urls to subdomains
This commit is contained in:
parent
5f486695ba
commit
fada97dab0
|
@ -34,6 +34,7 @@ ALLOWED_HOSTS = []
|
||||||
if DEBUG:
|
if DEBUG:
|
||||||
ALLOWED_HOSTS += [
|
ALLOWED_HOSTS += [
|
||||||
'spaceport-api.dns.t0.vc',
|
'spaceport-api.dns.t0.vc',
|
||||||
|
'api.spaceport.dns.t0.vc',
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,16 +1,6 @@
|
||||||
var siteUrl, apiUrl, staticUrl;
|
export const siteUrl = window.location.protocol + '//' + window.location.hostname;
|
||||||
|
export const apiUrl = window.location.protocol + '//api.' + window.location.hostname;
|
||||||
if (process.env.NODE_ENV !== 'production') {
|
export const staticUrl = window.location.protocol + '//static.' + window.location.hostname;
|
||||||
siteUrl = 'http://spaceport.dns.t0.vc';
|
|
||||||
apiUrl = 'http://spaceport-api.dns.t0.vc';
|
|
||||||
staticUrl = 'http://spaceport-static.dns.t0.vc';
|
|
||||||
} else {
|
|
||||||
siteUrl = 'https://' + window.location.hostname;
|
|
||||||
apiUrl = 'https://api.' + window.location.hostname;
|
|
||||||
staticUrl = 'https://static.' + window.location.hostname;
|
|
||||||
}
|
|
||||||
|
|
||||||
export { siteUrl, apiUrl, staticUrl };
|
|
||||||
|
|
||||||
export const requester = (route, method, token, data) => {
|
export const requester = (route, method, token, data) => {
|
||||||
let options = {headers: {}};
|
let options = {headers: {}};
|
||||||
|
|
Loading…
Reference in New Issue
Block a user