Oh, what a dumb I am. I have another location in the nginx.conf for another service. There is a wildcard there
location ~* /(dashboard|api|docs|redoc|openapi.json)
When I removed api from the wildcard, the sync started working.
api