Thijmen
Thijmen
FFilament
Created by Thijmen on 11/17/2023 in #❓┊help
HTTP/HTTPS issues with table.js
Quick setup for our server setup: We run the following on our VPS: - php 8.2 - nginx - mariaDB - Laravel 10.32.1 - filament/filament 3.0-stable We use cloudflare for our DNS which handles our SSL certificate This is all working perfectly and everything works except our mail button, we've created a custom button for this:
Tables\Actions\Action::make('send-confirmation-email')
->label('Send confirmation email')
->icon('heroicon-o-inbox-arrow-down')
->action(function(Booking $booking) {
\Log::info("Sending confirmation email to {$booking->email}");
\Mail::to($booking->email)->send(new TicketBooked($booking->toArray(), $booking->timeslot));
// Notify of success
Notification::make('email-sent')
->title("Email sent to {$booking->email}")
->success()
->send();
}),
Tables\Actions\Action::make('send-confirmation-email')
->label('Send confirmation email')
->icon('heroicon-o-inbox-arrow-down')
->action(function(Booking $booking) {
\Log::info("Sending confirmation email to {$booking->email}");
\Mail::to($booking->email)->send(new TicketBooked($booking->toArray(), $booking->timeslot));
// Notify of success
Notification::make('email-sent')
->title("Email sent to {$booking->email}")
->success()
->send();
}),
It works flawlessly on localhost (using herd) but it appears it does not want to work on our prod server, where we get this error:
async-alpine.js?v=3.0.97.0:1 Mixed Content: The page at 'https://{{URL}}/speelgoedwerkplaats/bookings' was loaded over HTTPS, but requested an insecure script 'http://{{URL}}/js/filament/tables/components/table.js?v=3.0.97.0'. This request has been blocked; the content must be served over HTTPS.
async-alpine.js?v=3.0.97.0:1 Mixed Content: The page at 'https://{{URL}}/speelgoedwerkplaats/bookings' was loaded over HTTPS, but requested an insecure script 'http://{{URL}}/js/filament/tables/components/table.js?v=3.0.97.0'. This request has been blocked; the content must be served over HTTPS.
Our .env has the right url: https://www.{{URL}}/ Does anyone know how to fix this, since our actions died on us like delete+mail
3 replies