Skip to content

Commit

Permalink
fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Victor committed Aug 5, 2022
1 parent 4b06d33 commit e4d8ac5
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 12 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@

# League API

A small project that allow admins to creat teams, fixtures, etc

A small project that allow admins to create teams, fixtures, etc

## Run Locally

Expand Down Expand Up @@ -30,7 +28,6 @@ Start the server
npm run start
```


## Environment Variables

Create a `.env` file and replace the contents of `example.env` inside your `.env` file
Expand All @@ -43,3 +40,6 @@ To run tests, run the following command
npm run test
```

## Documentation

[Documentation](https://documenter.getpostman.com/view/9742220/VUjLLSoa)
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"start": "npm run build && node dist/src/app.js",
"dev": "NODE_ENV=development nodemon src/app.ts",
"build": "rimraf ./dist && tsc -p .",
"test": "jest --watch"
"test": "jest --watchAll"
},
"author": "",
"license": "ISC",
Expand Down
9 changes: 2 additions & 7 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ const app: Application = express();
let RedisStore = connectRedis(session);
const redisClient = new Redis(configuration().redis.url);

// if running behind a proxy
// app.set('trust proxy', 1)

// Set Security Headers
app.use(helmet());

Expand Down Expand Up @@ -55,10 +52,9 @@ app.use(
resave: false,
saveUninitialized: false,
cookie: {
secure: configuration().env === 'production' ? true : 'auto',
secure: configuration().env === 'staging' ? true : 'auto',
httpOnly: true,
// expires:
sameSite: configuration().env === 'production' ? 'none' : 'lax',
sameSite: configuration().env === 'staging' ? 'none' : 'lax',
},
})
);
Expand Down Expand Up @@ -89,7 +85,6 @@ app.listen(port, async () => {
});

app.all('*', (req, res, next) => {
configuration().env;
next(new AppError(`Can't find ${req.originalUrl} on this server`, 404));
});

Expand Down

0 comments on commit e4d8ac5

Please sign in to comment.