Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Mixed content when changing page in table #13

Closed
vpuentem opened this issue Apr 27, 2021 · 5 comments
Closed

Mixed content when changing page in table #13

vpuentem opened this issue Apr 27, 2021 · 5 comments

Comments

@vpuentem
Copy link

In my prod server i'm getting this error "Mixed Content: The page at '' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint ''. This request has been blocked; the content must be served over HTTPS."

Probably not a bug, but can someone help me with this?

@pascalbaljet
Copy link
Contributor

I'm not sure this is related to the package. Could you provide more information or code examples?

@vpuentem
Copy link
Author

vpuentem commented Apr 28, 2021

I'm not sure this is related to the package. Could you provide more information or code examples?

I'm displaying a table with users data like below. The problem is when i try to change the page in the table i get the following error:

Mixed Content: The page at 'https://mydomain.com/userpage?page=1&sort=-id' was loaded over HTTPS, but requested an insecure XMLHttpRequest endpoint 'http://mydomain.com/userspage?sort=-id&page=2'. This request has been blocked; the content must be served over HTTPS.

<template> <app-layout> <div class="container mx-auto py-4 px-4 sm:px-6 lg:px-8"> <Table :search="queryBuilderProps.search" :columns="queryBuilderProps.columns" :on-update="setQueryBuilder" :meta="users" > <template #head> <tr> <th @click.prevent="sortBy(id)">Id</th> <th @click.prevent="sortBy(created_at)">Created at</th> <th @click.prevent="sortBy('name')">Name</th> <th v-show="showColumn('email')" @click.prevent="sortBy('email')">Email</th> </tr> </template> <template #body> <tr v-for="user in users.data" :key="user.id"> <td>{{ user.id }}</td> <td>{{ new Date(Date.parse(user.created_at)).toDateString() }}</td> <td>{{ user.name }}</td> <td v-show="showColumn('email')">{{ user.email }}</td> </tr> </template> </Table> </div> </app-layout> </template>

<script>/n import AppLayout from @/Layouts/AppLayout import { InteractsWithQueryBuilder, Tailwind2 } from @protonemedia/inertiajs-tables-laravel-query-builder export default { mixins: [InteractsWithQueryBuilder], props: { users: Object, }, components: { AppLayout, Table: Tailwind2.Table }, } </script>

I could be related to that i'm forcing https in my app service provider:

if(env('APP_ENV') === 'production') { URL::forceScheme('https'); }

@vpuentem
Copy link
Author

vpuentem commented May 3, 2021

Was an issue with the trusted proxies in my app

@vpuentem vpuentem closed this as completed May 3, 2021
@ezralazuardy
Copy link

@vpuentem did you manage to resolve this issue? if you do, how you fix it?.

@vpuentem
Copy link
Author

@vpuentem did you manage to resolve this issue? if you do, how you fix it?.

I fixed it by settings $proxies to trust all proxies in the TrustProxies Middleware, i'm not sure if it is the right approach thought.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants