Closed int-index closed 3 years ago
When I run the service locally (runhaskell backend/Search.hs
), it works fine: https://user-images.githubusercontent.com/4061728/106886138-9737c500-66f4-11eb-94d9-2ce034cbc725.png
On the other hand, the deployed version fails: https://user-images.githubusercontent.com/4061728/106886303-c6e6cd00-66f4-11eb-9e8b-88d2e6e12f54.png
The only difference that I know of is that in the deployed service there's nginx
in the middle:
services.nginx.virtualHosts.hackage-search = {
locations."/".proxyPass =
if ! isNull cfg.socket
then "http://unix:${cfg.socket}:/"
else "http://localhost:${toString cfg.port}/";
locations."/static/fonts/".alias = "${cfg.package}/fonts/";
But I don't know how to run the service locally to check if it's indeed the cause. @zhenyavinogradov Could you look into this? Thanks.
Right, it's nginx replacing urlencoded characters with real ones, I'll see how we can fix it
You won't believe this one simple trick https://github.com/serokell/hackage-search/pull/19
Did it really help? https://hackage-search.serokell.io/?q=%2F still fails.
That fix is not deployed yet, the service is part of the system configuration, so we have to update it in the -infra repo: https://github.com/serokell/pegasus-infra/pull/11. I need a review from ops to deploy it.
https://www.reddit.com/r/haskell/comments/kdmzpd/comment/ggqj5mw
@phadej: "Strings with / (normal slash) seems to result into 404 error"