Cannot get secure link with expires to work
Francis Daly
francis at daoine.org
Mon May 6 15:17:43 UTC 2019
On Wed, May 01, 2019 at 09:14:11AM +1000, Duke Dougal wrote:
Hi there,
> Hello I've tried every possible way I can think of to make secure links
> work with expires.
When I use your config on my test machine, it works for me.
So it looks like what you have is fundamentally correct; there is
obviously something wrong somewhere, but it is likely something small.
> No matter what I try, I cannot get it to work when I try to uses the expire
> time.
Can you copy-paste the command you use to test things; and perhaps show
the log line for that request?
> The command that fails:
>
> ubuntu at ip-172-31-34-191:/var/www$ curl
> http://127.0.0.1/html/index.html?md5=FsRb_uu5NsagF0hA_Z-OQgexpires=2147483647
As was pointed out - there should be & in the middle of that.
If you "merely" add &, you will probably see mostly-the-same response --
because your shell will read an unescaped & as "end of command".
My guess is that your log line will show the request for
/html/index.html?md5=FsRb_uu5NsagF0hA_Z-OQg, which will (correctly)
return 403.
What happens if you do
$ curl 'http://127.0.0.1/html/index.html?md5=FsRb_uu5NsagF0hA_Z-OQg&expires=2147483647'
(with &, and with the whole argument shell-quoted in '')?
Cheers,
f
--
Francis Daly francis at daoine.org
More information about the nginx
mailing list