single_use and deactivated_at #148
-
https://vimeo.com/748255348/fee77b1371 the above recorded for proof. I need in this package the expired link remove automatically. |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
There is one thing more that i have notice that is Cache, I have create a middleware for remove deactivated links and it's work fine that remove all links are expired but when i hit the copied link again it's showing the same result what you think about it. |
Beta Was this translation helpful? Give feedback.
-
Hey! Sorry to hear that you're having problems with the package. From looking at your video, it looks like your short URLs have a If so, this could be the reason for your activation times and single-use links not working. If your web browser is redirected with a 301 status code, then it'll treat it as a permanent redirect. This means that next time you visit your short URL, your browser will automatically redirect you to the destination URL without hitting your server. This means that we can't handle the redirect in the Laravel app to make sure that it's still valid. If you create your short URLs with a 302 status code instead, the browser will treat this as a temporary redirect. This means that when you visit it, your browser will go to your Laravel app as intended and we can then handle the redirect ourselves. Do you still have this error if you create a new short URL with a 302 status code? 🙂 |
Beta Was this translation helpful? Give feedback.
-
Actually I handled this issue with different way e.g i add key with destination url and at time of hit check first check key of destination url and move forward. |
Beta Was this translation helpful? Give feedback.
Hey! Sorry to hear that you're having problems with the package.
From looking at your video, it looks like your short URLs have a
301
redirect status code? Is that right?If so, this could be the reason for your activation times and single-use links not working. If your web browser is redirected with a 301 status code, then it'll treat it as a permanent redirect. This means that next time you visit your short URL, your browser will automatically redirect you to the destination URL without hitting your server. This means that we can't handle the redirect in the Laravel app to make sure that it's still valid.
If you create your short URLs with a 302 status code instead, the browser will tre…