Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"GET /logout/ HTTP/1.0" 405 Method Not Allowed #1180

Open
rodrigolfh opened this issue May 7, 2024 · 1 comment
Open

"GET /logout/ HTTP/1.0" 405 Method Not Allowed #1180

rodrigolfh opened this issue May 7, 2024 · 1 comment
Labels
bug Something isn't working or is broken

Comments

@rodrigolfh
Copy link

rodrigolfh commented May 7, 2024

I have a working django-desktop served over nginx as a proxy server and uvicorn as the asgi app server.

I installed it through pip.

Everything works, but the Logout button from the app. The logout button from django admin does work as it leads to https://192.168.xxx.xxx/logout/ and I get a message as "GET /logout/ HTTP/1.0" 405 Method Not Allowed

I am aware that since django 5.0 (I am using dijango 5.02) you cannot use GET to logout because of security issues, and already tried to replace the logout button with a miniform that forces the use of POST in order to logout (in navigation_header.html), but it still uses GET.

Using VSCode, I already searched for every file that contains "Logout". This search includes my project folder and my 'venv' folder which at the same time includes helpdesk and all of its files. I tried to pinpoint what template is the one used (even though i think it's 'navigation_header.html') replacing every 'Logout' string in every helpdesk template to 'Logout1', 'Logout2' and so on, hoping I would see the modified string in the rendered site, all with no avail.

I also tried changing the origin of the LogoutView imported to the one from django.contrib.auth, and put a print statement just at the start of every method to see which method is the one that's being called but nothing (I got debg=True btm).

It really baffles me that I cannot pinpoint where the problem is... and also where does the 'Logout' string from the nav-bar drop-down comes from? Is there a .capitalize() method used over a 'logout' string somewhere else?

imagen
imagen
imagen

imagen

@rodrigolfh rodrigolfh added the bug Something isn't working or is broken label May 7, 2024
@Benbb96
Copy link
Member

Benbb96 commented May 7, 2024

Hi @rodrigolfh, I tried to apply the fix in my local demodesk and it seems to work (see my PR #1181).

Are you sure the changes you made are correctly applied on your server ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working or is broken
Projects
None yet
Development

No branches or pull requests

2 participants