inertiajs / inertia-laravel

The Laravel adapter for Inertia.js.
https://inertiajs.com
MIT License
2.1k stars 235 forks source link

There is no automatic follow protocol, http is used under https, how to solve it #602

Closed phpmac closed 8 months ago

phpmac commented 8 months ago

There is no automatic follow protocol, http is used under https, how to solve it

phpmac commented 8 months ago

不知道在哪里设置选择,跟随协议还是定义协议(http|https)

driesvints commented 8 months ago

Hi there,

Thanks for reporting but it looks like this is a question which can be asked on a support channel. Please only use this issue tracker for reporting bugs with the library itself. If you have a question on how to use functionality provided by this repo you can try one of the following channels:

However, this issue will not be locked and everyone is still free to discuss solutions to your problem!

Thanks.

phpmac commented 8 months ago

What is generated by route() in the vue file is not https. How to solve it? ? I encountered this problem using laravel11, please advise

RobertBoes commented 8 months ago

@phpmac That has nothing to do with Inertia, the route() helper is provided by https://github.com/tighten/ziggy. Likely it's a setup issue, for example using a reverse proxy and not having the TrustProxies middleware set up properly, so Laravel doesn't detect it's served through HTTPS and thus Ziggy would generate http URLs.