Posts

Showing posts with the label redirect

laravel redirect back to post route, i get MethodNotAllowedHttpException

laravel redirect back to post route, i get MethodNotAllowedHttpException At first on a get request i show a form, on submitting it, it goes to a post url does some working in the controller and then returns another view which has a form. after submitting this form i validate some things and if the validation fails i want to redirect back with some errors but unfortunately laravel isn't allowing me to redirect back to a post method. Is there any way i can accomplish this? i have seen this answer on laracast https://laracasts.com/discuss/channels/laravel/redirect-back-to-post-route-i-get-methodnotallowed-exception but i couldn't grasp the recommendation these are my routes in the order described above. Route::get('/purchasePacks', 'masterDealerController@purchasePacks')->name('purchasePacks'); Route::post('/confirmPuchasedPacks','masterDealerController@confirmPuchasedPacks'); Route::post('/storeOrder','masterDealerCont...

Is it possible to check if a certain url is redericting without opening a request to the site in Python? [duplicate]

Is it possible to check if a certain url is redericting without opening a request to the site in Python? [duplicate] This question already has an answer here: I know that it is possible to check if a URL redirects, as mentioned in the following question and its answer. How to check if the url redirect to another url using Python using the following code: eq = urllib2.Request(url=url, headers=headers) resp = urllib2.urlopen(req, timeout=3) redirected = resp.geturl() != url # redirected will be a boolean True/False However, I have list of Millions of URLs. Currently it is discussed wether one of them is a harmful URL or redirects to a harmful URL. I want to know if it is possible to check for redirect without opening a direct connection to the redirecting website to avoid creating a connection with a harmful website? This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. Do...