Skip to main content
Transform your testing process with: Company-wide Licences, Test Observability & App Percy
No Result Found

Capturing multiple asset hosts

Enable capturing assets of multiple hosts

By default Percy’s SDKs will only capture assets that have a matching hostname to where the snapshot was captured.

For example, if you’re taking snapshots on https://example.com, and the page has assets hosted on https://cdn.example.com, the cdn.example assets will not be captured. In order to capture assets from other hostnames, you will need to each add one to the allowed-hostnames config.

allowed-hostnames can be set via a command line flag (-h or --allowed-hostname) when using percy exec:

$ percy exec -h cdn.example.com -- [your test command]

It also can be set in the Global SDK configuration file. Using yml as an example:

version: 2
discovery:
  allowed-hostnames:
    - cdn.example.com

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback

Is this page helping you?

Yes
No

We're sorry to hear that. Please share your feedback so we can do better

Contact our Support team for immediate help while we work on improving our docs.

We're continuously improving our docs. We'd love to know what you liked





Thank you for your valuable feedback!

Talk to an Expert
Download Copy Check Circle