0

I am using google storage Signed URL v4 to access the file via URL with expiry time, but I would like to specify the domain as well to restrict the URL to access everywhere on the internet. right now the google provides the fewer options to mention in the configurations of Signed URL.

I have referred this docs:

Sample code for read access:

// These options will allow temporary read access to the file
  const options = {
    version: 'v4',
    action: 'read',
    expires: Date.now() + 15 * 60 * 1000, // 15 minutes
  };

Is there any possibility to mention my hostname/domain name to restrict file access?, or How to access my storage files only in the specific websites?

151291
  • 3,308
  • 7
  • 48
  • 81
  • Based on this document [1] anyone who has access to the Signed URL can access to the resources and it is likely not possible to restrict the Signed URL to a specific domain/host on the web. [1] https://cloud.google.com/storage/docs/access-control/signed-urls#should-you-use – Mohammad I Jun 02 '20 at 04:12
  • You can create a Feature Request with Cloud Storage Engineering team by creating a Cloud Storage Public Issue which you can select from the list within the Storage and Databases section [1]. [1] https://cloud.google.com/support/docs/issue-trackers#trackers-list – Mohammad I Jun 02 '20 at 04:16

0 Answers0