urlhub
urlhub copied to clipboard
How can the copy button on the +keyword page copy https links instead of http links?
How can the copy button on the +keyword page copy https links instead of http links?
My domain already supports https, and I opened it with an https link.
I cannot reproduce it on my side, because my environment does not support https.
Maybe this can help
https://github.com/realodix/urlhub/blob/2204bf59be75c8281b154e9943046850557e4793/resources/views/frontend/short.blade.php#L40-L45
- data-clipboard-text="{{$url->short_url}}"
+ data-clipboard-text="{{url($url->short_url)}}"
Reference
- https://laravel.com/docs/10.x/urls#generating-urls
Thank you for your reply, I tried your plan, it is invalid. I used another method, which is a little inelegant, but it works.
urlhub/app/Providers/AppServiceProvider.php
+ use Illuminate\Support\Facades\URL;
+
urlhub/app/Providers/AppServiceProvider.php
+ URL::forceScheme('https');