Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 168bc695b6 |
@@ -2,6 +2,7 @@ WEB_PROTOCOL=http
|
|||||||
WEB_ADDRESS=localhost
|
WEB_ADDRESS=localhost
|
||||||
WEB_RESET_ADDRESS=localhost/reset
|
WEB_RESET_ADDRESS=localhost/reset
|
||||||
WEB_PORT=3200
|
WEB_PORT=3200
|
||||||
|
WEB_ORIGIN=http://localhost:3001
|
||||||
|
|
||||||
DB_HOSTNAME=database
|
DB_HOSTNAME=database
|
||||||
DB_DATABASE=auth
|
DB_DATABASE=auth
|
||||||
|
|||||||
+4
-3
@@ -29,8 +29,9 @@ const question = (prompt, def = null) => {
|
|||||||
(async () => {
|
(async () => {
|
||||||
//project configuration
|
//project configuration
|
||||||
const appName = await question('App Name', 'auth');
|
const appName = await question('App Name', 'auth');
|
||||||
const appWebOrigin = await question('Web Origin', `example.com`);
|
const appWebProtocol = await question('Web Protocol', 'https');
|
||||||
const appWebAddress = await question('Web Addr', `${appName}.${appWebOrigin}`);
|
const appWebOrigin = await question('Web Origin', `${appWebProtocol}://example.com`); //TODO: clean these up properly
|
||||||
|
const appWebAddress = await question('Web Addr', `${appName}.example.com`);
|
||||||
const postValidationHookArray = await question('Post Validation Hook Array', '');
|
const postValidationHookArray = await question('Post Validation Hook Array', '');
|
||||||
const resetAddress = await question('Reset Addr', `example.com/reset`);
|
const resetAddress = await question('Reset Addr', `example.com/reset`);
|
||||||
const appPort = await question('App Port', '3200');
|
const appPort = await question('App Port', '3200');
|
||||||
@@ -70,7 +71,7 @@ services:
|
|||||||
- "traefik.http.routers.${appName}router.service=${appName}service@docker"
|
- "traefik.http.routers.${appName}router.service=${appName}service@docker"
|
||||||
- "traefik.http.services.${appName}service.loadbalancer.server.port=${appPort}"
|
- "traefik.http.services.${appName}service.loadbalancer.server.port=${appPort}"
|
||||||
environment:
|
environment:
|
||||||
- WEB_PROTOCOL=https
|
- WEB_PROTOCOL=${appWebProtocol}
|
||||||
- WEB_ORIGIN=${appWebOrigin}
|
- WEB_ORIGIN=${appWebOrigin}
|
||||||
- WEB_ADDRESS=${appWebAddress}
|
- WEB_ADDRESS=${appWebAddress}
|
||||||
- HOOK_POST_VALIDATION_ARRAY=${postValidationHookArray}
|
- HOOK_POST_VALIDATION_ARRAY=${postValidationHookArray}
|
||||||
|
|||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "auth-server",
|
"name": "auth-server",
|
||||||
"version": "1.6.1",
|
"version": "1.6.2",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "auth-server",
|
"name": "auth-server",
|
||||||
"version": "1.6.1",
|
"version": "1.6.2",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"bcryptjs": "^2.4.3",
|
"bcryptjs": "^2.4.3",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "auth-server",
|
"name": "auth-server",
|
||||||
"version": "1.6.1",
|
"version": "1.6.2",
|
||||||
"description": "An API centric auth server. Uses Sequelize and mariaDB by default.",
|
"description": "An API centric auth server. Uses Sequelize and mariaDB by default.",
|
||||||
"main": "server/server.js",
|
"main": "server/server.js",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
|
|||||||
+1
-1
@@ -13,7 +13,7 @@ app.use(express.json());
|
|||||||
|
|
||||||
app.use(cors({
|
app.use(cors({
|
||||||
credentials: true,
|
credentials: true,
|
||||||
origin: [`${process.env.WEB_PROTOCOL}://${process.env.WEB_ORIGIN}`],
|
origin: [`${process.env.WEB_ORIGIN}`],
|
||||||
allowedHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization', 'Set-Cookie'],
|
allowedHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization', 'Set-Cookie'],
|
||||||
exposedHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization', 'Set-Cookie'],
|
exposedHeaders: ['Origin', 'X-Requested-With', 'Content-Type', 'Accept', 'Authorization', 'Set-Cookie'],
|
||||||
}));
|
}));
|
||||||
|
|||||||
Reference in New Issue
Block a user