Skip to content

Conversation

@samu698
Copy link

@samu698 samu698 commented Nov 9, 2025

rewrite /qbt(.*) $1 break;
proxy_pass http://127.0.0.1:30000/;
# Rewrite redirect responses to include the prefix
proxy_redirect /qbt/;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

return 301 /qbt/;
}
location ~^/qbt/ {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Following the specified syntax:

Suggested change
location ~^/qbt/ {
location ~ ^/qbt/ {

Comment on lines +6 to +9
# Redirect to link with trailing slash, to allow correct relative path resolution
location = /qbt {
return 301 /qbt/;
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

From https://nginx.org/en/docs/http/ngx_http_core_module.html#location

In response to a request with URI equal to this string, but without the trailing slash, a permanent redirect with the code 301 will be returned to the requested URI with the slash appended.

So it seems this manual 301 redirection is not needed, right?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Chocobo1
IMO, this PR is yet another iteration of "stretching the point".
Personally, I'm not going to approve any related PR until I see real "steps to reproduce" the problem (under normal conditions) that they're supposed to solve.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Personally, I'm not going to approve any related PR until I see real "steps to reproduce" the problem (under normal conditions) that they're supposed to solve.

Sure. But I'm curious to see their reply, such as why didn't it work before and why this change fixes it (with examples). We can make the judgement afterwards.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure. But I'm curious to see their reply, such as why didn't it work before and why this change fixes it (with examples). We can make the judgement afterwards.

Yes, this is exactly what I tried to get from people in all related Issues, but I didn't get anything significant except abstract reasoning, or unsubstantiated stories about the existence of some problem.

@samu698 samu698 closed this Nov 10, 2025
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.

3 participants