Drupal 8 status code set 301 instead of 302 for urls with out lang code I have an article with url alias '/gettting-started' and it is translated in several languages.

Lang codes for other languages is set like the following.

For German:de-de, English: en-us.

In 'admin/config/regional/language/detection' Detection and selection languages, priority is set to 'URL' then 'Browser'.

My browser locale set to German first,so when i try to visit the article with the /getting-started, it is redirected to /de-de/getting-started with the status 301.

The status code 301 is creating the problem for me as the response is cached at varnish cache (for 301 response codes). 

The other user, with English as priority in Browser language visits /getting-started redirects to /de-de/getting-started

So, instead of sending 301, how can i send 302 redirect for urls without language code as a prefix.
That redirect isn't a drupal standard feature, it is done by the redirect.module.

It is currently using the default response header of the redirect configuration in \Drupal\redirect\EventSubscriber\RouteNormalizerRequestSubscriber::onKernelRequestRedirect(). That is a bit weird as that is the default for new manually created redirects which usually should be cached.

I think there is an issue in the redirect module to change that to a different configuration or always using 302, if not, feel free to create one.