[Improvement] SEO optimization and caching
Hey there!
A few comments what I discovered during my testing today:
-
Using
HTTP/1.1 301 Moved Permanentlyto redirect content instead ofHTTP/1.1 302 Foundwould be a better choice. Search engines will honor 301 better than 302 (read here for example). This will make Google happier. -
Cache control could be improved to avoid reverse proxies will behave uncontrolled and absorb requests that won't end up in the statistics. This would indeed be a requirement to force browser to not cache 301 responses as they would usually do in comparison to 302.
To achieve this, these response headers can easily be added to the Azure Function like this:

I could provide a patch for these lines of code, if desired.
┆Issue is synchronized with this Trello card by Unito
The Azure Function v4 don't have proxies anymore. The Doc of AzUrlShortener currently suggest using Cloudflare rules. However, we could update the doc for 302...