From 81573cd2c7d7d7a5f7237c4283ba97a55300aa4d Mon Sep 17 00:00:00 2001 From: Jan Tuomi Date: Wed, 5 Feb 2020 11:35:13 +0200 Subject: Implement CSP --- docker-compose.yml | 3 ++- frontend/public/index.html | 3 +++ frontend/src/Home.js | 3 +++ frontend/src/Login.js | 2 +- frontend/src/Register.js | 2 +- 5 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docker-compose.yml b/docker-compose.yml index a52fa93..06a0b88 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -29,13 +29,14 @@ services: frontend: build: frontend - tty: true + tty: false environment: REACT_APP_API_BASE_URL: http://localhost:4000 ports: - 3000:3000 volumes: - ./frontend/src:/app/src + - ./frontend/public:/app/public volumes: dbdata: diff --git a/frontend/public/index.html b/frontend/public/index.html index aa069f2..cc94d49 100644 --- a/frontend/public/index.html +++ b/frontend/public/index.html @@ -5,6 +5,9 @@ + {
Hello {user.username}! +
+ Placeholder +
); }); diff --git a/frontend/src/Login.js b/frontend/src/Login.js index 1a1cb2b..d17a5ab 100644 --- a/frontend/src/Login.js +++ b/frontend/src/Login.js @@ -6,7 +6,7 @@ import axios from './axios'; import userState from './UserState'; const Login = () => { - const { register, handleSubmit, watch, errors } = useForm(); + const { register, handleSubmit } = useForm(); const [ loginError, setLoginError ] = useState(null); const onSubmit = async data => { diff --git a/frontend/src/Register.js b/frontend/src/Register.js index e49b4ea..f4a6ec3 100644 --- a/frontend/src/Register.js +++ b/frontend/src/Register.js @@ -6,7 +6,7 @@ import axios from './axios'; import userState from './UserState'; const Register = () => { - const { register, handleSubmit, watch, errors } = useForm(); + const { register, handleSubmit } = useForm(); const [ loginError, setLoginError ] = useState(null); const onSubmit = async data => { -- cgit v1.3