SPATIE

  • Products
  • Open Source
  • Courses
  • Web Development
VacanciesAboutBlogDocsGuidelinesMerch ↗ Log in

Docs Browsershot Miscellaneous-options Fixing cors issues

Other versions for crawler v4 v3
    • Introduction
    • Support us
    • Requirements
    • Installation & setup
    • Upgrading
    • Questions and issues
    • Changelog
    • About us

    Usage

    • Introduction
    • Creating images
    • Creating PDFs
    • Creating HTML

    Miscellaneous options

    • Adding extra headers to every request
    • Adding extra headers to the navigational request
    • Changing the language of the browser
    • Changing the value of a dropdown
    • Clicking on the page
    • Connection to a remote chromium/chrome instance
    • Disable sandboxing
    • Fixing cors issues
    • Getting console output
    • Getting failed requests
    • Ignore HTTPS errors
    • Passing environment variables to the browser
    • Performance
    • Prevent unsuccessful responses
    • Sending POST requests
    • Setting an arbitrary option
    • Setting the CSS media type of the page
    • Setting the timeout
    • Setting the user agent
    • Specifying-a-proxy-server
    • Typing on the page
    • Using a pipe instead of a WebSocket
    • Using cookies
    • Using HTTP Authentication
    • Using url for html content
    • Writing options to a file
    • Disabling redirects
    • Read redirect history

Fixing cors issues

If you experience issues related to cors, you can opt to disable cors checks with --disable-web-security.

Browsershot::url('https://example.com')
   ->setOption('args', ['--disable-web-security'])
   ->save($pathToImage);
Disable sandboxing
Getting console output
Help us improve this page
Laravel beyond CRUD

Check out our course on Laravel development for large apps

Help us improve this page
  • Products
  • Open Source
  • Courses
  • Web Development
VacanciesAboutBlogDocsGuidelinesMerch ↗ Log in

Kruikstraat 22, Box 12
2018 Antwerp, Belgium
info@spatie.be
+32 3 292 56 79
  • GitHub
  • Instagram
  • LinkedIn
  • Twitter
  • Bluesky
  • Mastodon
  • YouTube
  • Privacy
  • Disclaimer

+32 3 292 56 79

Our office is closed now, email us instead

    Enter a search term to find results in the documentation.