nginx is trying to redirect access to s3 under assets.
location~*^/assets{
return301 https://s3-ap-northeast-1.amazonaws.com/hoge-assets$request_uri;
break;
}
Location returned the desired path.
However, Chrome ended up accessing "Path with Location value under the original domain".
Chrome and Firefox both behaved the same way, so I think it may be caused by nginx or html, not browser.The html is as follows.
<link rel="stylesheet" media="all" href="/assets/application-d07f97160f917fd45d04dc4f95823689.css"data-turbolinks-track="true"/>
Also, I understand that the URL should be embedded when rendering html, but
Due to historical background, we are considering redirecting to nginx.
Probably not "https://" (not a single slash).
© 2024 OneMinuteCode. All rights reserved.