Adding custom filtering rules with block/unblock buttons returns 405 errors #641

Closed
opened 2026-03-04 00:41:24 -05:00 by deekerman · 9 comments
Owner

Originally created by @rfgamaral on GitHub (Apr 10, 2019).

Steps to reproduce

  1. Open the Query Log page.
  2. Block/Unblock some entry.
  3. Observe bottom-right error calling set_rules.
  4. Rules were actually added and saved (look at the Filters page).

Expected behavior

Block/Unblock rules should be added to custom filtering rules without any errors.

Actual behavior

Block/Unblock rules are added to custom filtering rules but popup errors still show up.

Screenshot:

image

Your environment

Description Value
Version of AdGuard Home server: (e.g. v0.94)
Originally created by @rfgamaral on GitHub (Apr 10, 2019). <!--- Help us to avoid duplicate reports, make sure you have searched through existing issues before submitting a new one--> <!--- If you are requesting a new feature, tell us how it should work in free form--> <!--- If you are reporting a bug, submit the detailed description using the template below--> ### Steps to reproduce <!--- Provide a link to a live example or a clear set of steps to reproduce the issue--> 1. Open the Query Log page. 2. Block/Unblock some entry. 3. Observe bottom-right error calling `set_rules`. 4. Rules were actually added and saved (look at the Filters page). ### Expected behavior Block/Unblock rules should be added to custom filtering rules without any errors. ### Actual behavior Block/Unblock rules are added to custom filtering rules but popup errors still show up. <details><summary>Screenshot:</summary> ![image](https://user-images.githubusercontent.com/96476/55874313-e872de00-5b89-11e9-83f5-1cc8dfe1fe57.png) </details> ### Your environment <!--- Please include all relevant details about the environment you experienced the bug in --> | Description | Value | | -------------- | ------------ | | Version of AdGuard Home server:| (e.g. v0.94)
Author
Owner

@rfgamaral commented on GitHub (Apr 10, 2019):

Probably related... Editing custom filtering rules manually and clicking "Apply", returns the same 405 error and my AdGuard Home Docker container crashes. Rules seem to be saved to the config file but it still crashes and returns 405 errors.

@rfgamaral commented on GitHub (Apr 10, 2019): Probably related... Editing custom filtering rules manually and clicking "Apply", returns the same 405 error and my AdGuard Home Docker container crashes. Rules seem to be saved to the config file but it still crashes and returns 405 errors.
Author
Owner

@ameshkov commented on GitHub (Apr 10, 2019):

Hm, I cannot reproduce this.

Also, 405 means "Method not allowed". I suspect you have some reverse proxy in front of AdGuard Home that does not accept PUT method. Do you have any?

@ameshkov commented on GitHub (Apr 10, 2019): Hm, I cannot reproduce this. Also, `405` means "Method not allowed". I suspect you have some reverse proxy in front of AdGuard Home that does not accept `PUT` method. Do you have any?
Author
Owner

@rfgamaral commented on GitHub (Apr 11, 2019):

Yes, I do have a reverse proxy in front of AdGuard (there are no options to configure what's allowed or not). However, I also tested this connected directly to the source IP:PORT, same issue.

@rfgamaral commented on GitHub (Apr 11, 2019): Yes, I do have a reverse proxy in front of AdGuard (there are no options to configure what's allowed or not). However, I also tested this connected directly to the source IP:PORT, same issue.
Author
Owner

@ameshkov commented on GitHub (Apr 11, 2019):

I just don't see any place in the code where we return error code 405.

Although, I guess we should stick to GET and POST to avoid issues with proxies.

@ameshkov commented on GitHub (Apr 11, 2019): I just don't see any place in the code where we return error code 405. Although, I guess we should stick to GET and POST to avoid issues with proxies.
Author
Owner

@rfgamaral commented on GitHub (Apr 11, 2019):

Although, I guess we should stick to GET and POST to avoid issues with proxies.

That solves it?

However, how do you explain this problem when accessing without the proxy?

@rfgamaral commented on GitHub (Apr 11, 2019): > Although, I guess we should stick to GET and POST to avoid issues with proxies. That solves it? However, how do you explain this problem when accessing without the proxy?
Author
Owner

@ameshkov commented on GitHub (Apr 11, 2019):

That solves it?

I think it does, but we'll have to check once it's ready.

However, how do you explain this problem when accessing without the proxy?

Is it still a 405 error? Then there is still a proxy (no idea how so, though).

@ameshkov commented on GitHub (Apr 11, 2019): > That solves it? I think it does, but we'll have to check once it's ready. > However, how do you explain this problem when accessing without the proxy? Is it still a 405 error? Then there is still a proxy (no idea how so, though).
Author
Owner

@rfgamaral commented on GitHub (Apr 11, 2019):

Actually, I have a different error:

http://192.168.0.253:3000 (direct connection)

image

The PUT request doesn't even finish here...

https://adguard.custom.domain/ (nginx reverse proxy)

image

The PUT request returns 405.

I just did further testing and I'm almost positive the problem is not the reverse proxy...

I installed AdGuard Home in a second work and I no longer had this issue. In fact, this new container also "fixed" issue #703 that I opened a few days ago. This is probably a problem in my network setup.

What's the difference between these 2 containers? Well, this new Docker container network was set to host while the other one was using the macvlan driver. The idea here was to have a specific IP (different from the container host) for the DNS server:

image

This is probably causing all these issues, I'm just not sure exactly what it is...

@rfgamaral commented on GitHub (Apr 11, 2019): Actually, I have a different error: ##### `http://192.168.0.253:3000` (direct connection) ![image](https://user-images.githubusercontent.com/96476/55955439-5c2fec00-5c59-11e9-948a-68cfea7982d3.png) The `PUT` request doesn't even finish here... ##### `https://adguard.custom.domain/` (nginx reverse proxy) ![image](https://user-images.githubusercontent.com/96476/55955497-81bcf580-5c59-11e9-99df-b2504926058d.png) The `PUT` request returns `405`. I just did further testing and I'm almost positive the problem **is not** the reverse proxy... I installed AdGuard Home in a second work and I no longer had this issue. In fact, this new container also "fixed" issue #703 that I opened a few days ago. This is probably a problem in my network setup. What's the difference between these 2 containers? Well, this new Docker container network was set to `host` while the other one was using the `macvlan` driver. The idea here was to have a specific IP (different from the container host) for the DNS server: ![image](https://user-images.githubusercontent.com/96476/55956260-723eac00-5c5b-11e9-9f0c-3d83af592210.png) This is probably causing all these issues, I'm just not sure exactly what it is...
Author
Owner

@rfgamaral commented on GitHub (Apr 11, 2019):

Ok, I'm really confused about a lot of things right now and I'm not sure what's going. Please allow me to do further testing and review all this properly. I'll post back my results when I'm bit more sure of what is actually working and what is not.

@rfgamaral commented on GitHub (Apr 11, 2019): Ok, I'm really confused about a lot of things right now and I'm not sure what's going. Please allow me to do further testing and review all this properly. I'll post back my results when I'm bit more sure of what is actually working and what is not.
Author
Owner

@rfgamaral commented on GitHub (Apr 11, 2019):

Closing since the actual issue was #713.

@rfgamaral commented on GitHub (Apr 11, 2019): Closing since the actual issue was #713.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/AdGuardHome#641
No description provided.