Ruta desarrollo http://localhost:5000, producción 80

This commit is contained in:
Juan Ferrer Toribio 2017-06-02 09:29:14 +02:00
parent 80e6b0c666
commit 481a2219ce
8 changed files with 25 additions and 25 deletions

View File

@ -8,7 +8,7 @@ export default class Controller {
this.modules = modulesFactory.getModules();
}
onLogoutClick() {
this.$window.location = 'salix/logout';
this.$window.location = '/logout';
}
onChangeLanguage() {
let lang = this.$translate.use() == 'en' ? 'es' : 'en';

View File

@ -1,4 +1,4 @@
{
"default": "salix/login",
"salix": "/salix/login"
"default": "/login",
"salix": "/login"
}

View File

@ -41,6 +41,7 @@ module.exports = function(app) {
let query = url.parse(req.body.location, true).query;
let loginUrl = applications[query.apiKey];
if (!loginUrl)
loginUrl = applications.default;

View File

@ -14,4 +14,4 @@ RUN echo listen-address=127.0.0.1 > /etc/dnsmasq.d/dnsmasq.conf
CMD service dnsmasq restart && nginx -g "daemon off;"
EXPOSE 8080
EXPOSE 80

View File

@ -21,29 +21,29 @@ http {
scgi_temp_path temp/scgi;
server {
listen 8080;
listen 5000;
server_name localhost;
autoindex off;
location ~ ^/static(?:/(.*))?$ {
location ~ ^/static/(?:(.*))?$ {
proxy_pass http://127.0.0.1:8081/$1$is_args$args;
}
location ~ ^/auth(?:/(.*))?$ {
location ~ ^/auth/(?:(.*))?$ {
proxy_pass http://127.0.0.1:3000/$1$is_args$args;
}
location ~ ^/salix(?:/(.*))?$ {
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
}
location ~ ^/client(?:/(.*))?$ {
location ~ ^/client/(?:(.*))?$ {
proxy_pass http://127.0.0.1:3002/$1$is_args$args;
}
location ~ ^/mailer(?:/(.*))?$ {
location ~ ^/mailer/(?:(.*))?$ {
proxy_pass http://127.0.0.1:3003/$1$is_args$args;
}
location ~ ^/(?:(.*))?$ {
proxy_pass http://127.0.0.1:3001/$1$is_args$args;
}
}
types {
@ -59,4 +59,3 @@ http {
image/jpeg jpeg jpg;
}
}

View File

@ -13,7 +13,7 @@ http {
include /etc/nginx/mime.types;
server {
listen 8080;
listen 80;
server_name localhost;
autoindex off;
@ -24,20 +24,20 @@ http {
autoindex on;
}
location ~ ^/auth(?:/(.*))?$ {
location ~ ^/auth/(?:(.*))?$ {
proxy_pass http://auth:3000/$1$is_args$args;
}
location ~ ^/salix(?:/(.*))?$ {
proxy_pass http://salix:3001/$1$is_args$args;
}
location ~ ^/client(?:/(.*))?$ {
location ~ ^/client/(?:(.*))?$ {
proxy_pass http://client:3002/$1$is_args$args;
}
location ~ ^/mailer(?:/(.*))?$ {
location ~ ^/mailer/(?:(.*))?$ {
proxy_pass http://mailer:3003/$1$is_args$args;
}
location ~ ^/(?:(.*))?$ {
proxy_pass http://salix:3001/$1$is_args$args;
}
}
}
}

View File

@ -3,7 +3,7 @@
<head>
<meta charset="UTF-8">
<title>Salix</title>
<script src="/salix/acl"></script>
<script src="/acl"></script>
</head>
<body>
<vn-app></vn-app>

View File

@ -27,7 +27,7 @@ module.exports = function (app) {
validateToken(token, function(isValid) {
if (isValid) {
res.cookie('vnToken', token/*, {httpOnly: true}*/);
res.redirect(continueUrl ? continueUrl : '/salix');
res.redirect(continueUrl ? continueUrl : '/');
}
else
redirectToAuth(res);