diff --git a/docker-compose-build.yml b/docker-compose-build.yml index 3a023a7a229e7c055a756bb265136ddfd13b9d4a..1b68a2239e41a806f2482cde3a3b1e8745a845b4 100644 --- a/docker-compose-build.yml +++ b/docker-compose-build.yml @@ -16,7 +16,7 @@ services: - recaptcha_private= #Please enter here your private Key for google recaptcha - recaptcha_public= #Please enter here your public Key for google recaptcha - host=0.0.0.0 #With this variable you can set the access ip range. 127.0.0.1 means you can only access it from the local network and 0.0.0.0 means everyone can access it. - - GITHUB_CLIENT_ID= #You have to set these two variables, if not the shorter will not run. To get the keys visit https://github.com/settings/developers and register a new oauth application. The callback path is /github-callback + - GITHUB_CLIENT_ID= #You have to set these two variables, if not the shorter will not run. To get the keys visit https://github.com/settings/developers and register a new oauth application. The callback path is /user/github-callback - GITHUB_CLIENT_SECRET= volumes: url_shorter_db: \ No newline at end of file diff --git a/docker-compose.yml b/docker-compose.yml index 750e071e420663c976032bf0c10ad942ae610670..9c1cb549bc86acc4e13b0613a060f018fc489b84 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -17,7 +17,7 @@ services: - recaptcha_public= #Please enter here your public Key for google recaptcha - host=0.0.0.0 #With this variable you can set the access ip range. 127.0.0.1 means you can only access it from the local network and 0.0.0.0 means everyone can access it. - host=0.0.0.0 #With this variable you can set the access ip range. 127.0.0.1 means you can only access it from the local network and 0.0.0.0 means everyone can access it. - - GITHUB_CLIENT_ID= #You have to set these two variables, if not the shorter will not run. To get the keys visit https://github.com/settings/developers and register a new oauth application. The callback path is /github-callback + - GITHUB_CLIENT_ID= #You have to set these two variables, if not the shorter will not run. To get the keys visit https://github.com/settings/developers and register a new oauth application. The callback path is /user/github-callback - GITHUB_CLIENT_SECRET= volumes: url_shorter_db: diff --git a/main.py b/main.py index 170e7c791fac90f821429552687a5f062b852b47..660de964011852bf6a9149cea8f5a8c6d4b2d9e4 100644 --- a/main.py +++ b/main.py @@ -210,11 +210,11 @@ def redirect_short_url(short_url): abort(404) -@app.route('/login') +@app.route('/user/login') def login(): return github.authorize(scope="user") -@app.route('/github-callback') +@app.route('/user/github-callback') @github.authorized_handler def authorized(oauth_token): if oauth_token is None: @@ -230,7 +230,7 @@ def authorized(oauth_token): resp.set_cookie('username', username) return resp -@app.route('/logout') +@app.route('/user/logout') def logout(): resp = make_response("logout successfull") resp.set_cookie('userID', "", max_age=0)