Skip to content

Update doku.py#1

Open
grasdk wants to merge 1 commit intomasterfrom
grasdk-doku_url_dupl
Open

Update doku.py#1
grasdk wants to merge 1 commit intomasterfrom
grasdk-doku_url_dupl

Conversation

@grasdk
Copy link
Owner

@grasdk grasdk commented Apr 10, 2025

What does this PR do?

Fixes the dual path problem from searxng#4598

Exchanges string concat of URLs with urljoin from urllib.parse. This eliminates the dual problem.

Why is this change important?

Dokuwiki searches behind reverse proxy had duplicate base path in the url. This makes the engine less useful.

How to test this PR locally?

Configure searxng's settings.yml like shown in searxng#4598. Requires that you have a working dokuwiki installed

Related issues

Dokuwiki searches behind reverse proxy had duplicate base path in the url,
creating a wrong url.

This patch exchanges string concat of URLs with urljoin [1] from urllib.parse.  This
eliminates the dual problem, while retaining the old functionality designed to
concatenate protocol, hostname and port (as base_url) with path.

[1] https://docs.python.org/3/library/urllib.parse.html#urllib.parse.urljoin

Closes: searxng#4598
@return42 return42 force-pushed the grasdk-doku_url_dupl branch from f0cb9e8 to 01baae2 Compare April 11, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant