I hate regex..
But in some cases I have to use regular expressions. How can I get the content in bold below?
https://proxyhost/bucketname/test/uid
location ~* /regex/ {
proxy_pass https://$1.s3.amazonaws.com/;
}
I need use this regex to extract the bucket name and fill the real url in Nginx S3 proxy
Thanks!
2
Answers
use "return 200 $1;" get the correct result, but now I get another error named SignatureDoesNotMatch
researching...(google ing)
Assuming you’re using python.