Skip to content

Commit

Permalink
Renderer: allow cors for file [skip-ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Panchenko committed May 27, 2024
1 parent 86b07fc commit ad723fa
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/penai/render.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ def __init__(self, wait_time: float | None = None):
chrome_options.add_argument("--force-device-scale-factor=1.0")
chrome_options.add_argument("--high-dpi-support=1.0")

# Allow CORS for file://
chrome_options.add_argument("--allow-file-access-from-files")

try:
self.driver = webdriver.Chrome(
service=ChromeService(ChromeDriverManager().install()),
Expand Down

0 comments on commit ad723fa

Please sign in to comment.