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

Issue279 replace with alias #280

Merged
merged 2 commits into from
Jul 26, 2024
Merged

Issue279 replace with alias #280

merged 2 commits into from
Jul 26, 2024

Conversation

ayase-mstk
Copy link
Collaborator

request uriがファイルパスである時に、location uriの部分をaliasに差し替えるようにしました。

ex)
listen4242;
locatino /alias/ {
   alias test;
}


localhost:4242/alias/index.html
↓
localhost:4242/test/index.html

Copy link
Owner

@YungTatyu YungTatyu left a comment

Choose a reason for hiding this comment

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

対応ありがとうございます。
挙動問題なさそうでした。

Comment on lines +757 to +758
if (pos != std::string::npos) request.uri_ = request.uri_.substr(pos + location->uri_.length());
}
Copy link
Owner

Choose a reason for hiding this comment

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

これはロジック的に、みつからないことはあるんですか?
if (pos != std::string::npos)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

必ず見つかるはずですが一応つけておきました。気になるようでしたら、削除します!

@YungTatyu YungTatyu merged commit dd2b225 into main Jul 26, 2024
5 checks passed
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.

2 participants