n2o / url-shortener

Shorty: The URL Shortener
MIT License
17 stars 15 forks source link

issue #28 #29

Closed niruc100 closed 4 years ago

niruc100 commented 4 years ago

add logout button to admin.html

Edit: After a few hours I was able to solve both issues. It is now a SPA with Login/Logout integrated. Hope this is what you thought it should be.

n2o commented 4 years ago

Thanks, I will review this in a moment.

Could you please use 2 Spaces in HTML? Thanks :-)

n2o commented 4 years ago

image The lower list should not be accessible when not logged in

n2o commented 4 years ago

Please add an alert-info above the login form to show users that they first need to authenticate:

<div class="alert alert-info" role="alert">
  To access the admin panel, you must first login.
</div>
n2o commented 4 years ago

With you configuration, it is not possible to logout:

http://localhost:8080/logout

image

niruc100 commented 4 years ago

Hey,

i tried to fix what I was able to. I can only reproduce your Logout Failure when I perform a get Request with my browser, then the LinkController wants to process my /logout as an abbreviation. If i use the Logoutbutton everything works fine. BTW I am using the following dockercontainer to run shorty:

version: "3.7" services: redis: image: redis:alpine ports:

iTitus commented 4 years ago

You can use the blacklist to disable routes from becoming abbreviations

n2o commented 4 years ago

Thanks!