I have deployed a Laravel app and want to run Swoole (Octane).
The app works correctly if I use a php-fpm but because it is Livewire driven, the an unacceptable 1sec latency is present on all HTTP and XML requests.
This latency is 50ms using Swoole which is great. The only problem I have is:
One of my important javascript files fails to load because of a MIME error see:
Chrome: Refused to execute script from 'https://app.aeroquote.com/admin/dashboard' because its MIME type ('text/html') is not executable, and strict MIME type checking is enabled.
Safari: [Error] Refused to execute https://app.aeroquote.com/livewire/livewire.js?id=de3fca26689cb5a39af4 as script because "X-Content-Type-Options: nosniff" was given and its Content-Type is not a script MIME type.
Where have I gone wrong ?
ping @fideloper-fly and @greg
webuser@e28b2d9f:/etc/nginx/sites-enabled$ cat default
# HTTP configuration
#
server {
listen 8080 default_server;
listen [::]:8080 default_server;
root /var/www/html/public;
# Set allowed "index" files
index index.html index.htm index.php;
server_name _;
charset utf-8;
# Set max upload to 2048M
client_max_body_size 2048M;
location /index.php {
try_files /not_exists @octane;
}
location / {
try_files $uri $uri/ @octane;
}
location @octane {
set $suffix "";
if ($uri = /index.php) {
set $suffix ?$query_string;
}
proxy_http_version 1.1;
proxy_set_header Host $http_host;
proxy_set_header Scheme $scheme;
proxy_set_header SERVER_PORT $server_port;
proxy_set_header REMOTE_ADDR $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection $connection_upgrade;
proxy_pass http://127.0.0.1:8000$suffix;
}
# additional config
include /etc/nginx/server-opts.d/*.conf;