Search code examples
laravelvoyager

Voyager admin menu empty on VPS


I deployed my application on Google VM machine and menu items are empty. There is no issue in my local host. The database is migrated and working completely fine on every other things.

What I've tried so far:

  • migrate
  • server restart
  • database re - dump
  • tampered with data_types table
  • voyager:admin for full permission

But nothing seems to work.

Menu Items

Any idea why this is happening?


Solution

  • it's probably blocked by Content-Security-Policy. This header could be added by nginx or apache2. The voyager uses vue2 and require eval method. Append to CSP this data: script-src: 'self' 'unsafe-eval'.

    My example:

    add_header Content-Security-Policy "default-src 'self' http: https: data: blob: 'unsafe-inline' script-src: 'self' 'unsafe-eval'" always;