title: Google Cloud Storage get signedUrl from CDN npm
body: <p>I am using a code as the following to create a signed Url for my content:</p>
  
  <pre><code>var storage = require('@google-cloud/storage')();
  var myBucket = storage.bucket('my-bucket');
  var file = myBucket.file('my-file');
  
  //-
  // Generate a URL that allows temporary access to download your file.
  //-
  var request = require('request');
  
  var config = {
    action: 'read',
    expires: '03-17-2025'
  };
  
  file.getSignedUrl(config, function(err, url) {
    if (err) {
      console.error(err);
      return;
    }
  
    // The file is now available to read from the URL.
  
  });
  </code></pre>
  
  <p>This creates an Url that starts with <code>https://storage.googleapis.com/my-bucket/</code></p>
  
  <p>If I place that URL in the browser, it is readable.</p>
  
  <p>However, i guess that URL is a direct access to the bucket file and is not passing through my configured CDN.</p>
  
  <p>I see that in the docs (<a href="https://cloud.google.com/nodejs/docs/reference/storage/1.6.x/File#getSignedUrl" rel="nofollow noreferrer">https://cloud.google.com/nodejs/docs/reference/storage/1.6.x/File#getSignedUrl</a>) you can pass a cname option, which transforms the url to replace <code>https://storage.googleapis.com/my-bucket/</code> to my bucket CDN.</p>
  
  <p>HOWEVER when I copy the resulting URL, the sevice account or resulting url doesn't seem to have access to the resource.</p>
  
  <p>I have added the firebase admin service account to the bucket but still I get no access.</p>
  
  <p>Also, from the docs, the CDN signed url seems a lot different from the one signed through that API.  Is it possible to create from the api a CDN signed url, or should i manually create it as explained in: <a href="https://cloud.google.com/cdn/docs/using-signed-urls?hl=en_US&amp;_ga=2.131493069.-352689337.1519430995#configuring_google_cloud_storage_permissions" rel="nofollow noreferrer">https://cloud.google.com/cdn/docs/using-signed-urls?hl=en_US&amp;_ga=2.131493069.-352689337.1519430995#configuring_google_cloud_storage_permissions</a>? </p>