-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Causing Delay for custom APIs #56
Comments
I was having a similar requirement, we were overriding CheckForDirectMatch method and filtering some URL's In CheckForDirectMatchif (!IsValidPath(requestedPath)) return;
base.CheckForDirectMatch(db,requestedUrl,requestedPath,args); private bool IsValidPath(string requestedPath)
{
var excludedUrlsList = Settings.ExcludedUrlsPrefix.Split(';');
if (excludedUrlsList.Any(q => !string.IsNullOrWhiteSpace(q) && requestedPath.Contains(q))) return false;
return true;
} In sitecore config settings<setting name="ExcludedUrlsPrefix" value="/blog/api/;/chat/api/;" /> not sure if someone has a better solution. |
thanks, this will do nicely for now. |
Just FYI for future visitors, this code worked better for me as an override:
|
this is great, we were having few other customizations hence overriding |
Hello, love the module, I just have a little issue...
The site I administer is over 3 years old and is constantly updated, as a consequence the Auto Generated URLs have accumulated over time into the many thousands, 7300 in fact. This became an issue because calls to extremely simple APIs were taking 2-3 seconds to respond.
It is definitely the Redirect Module causing the delay because I can see the time taken in Sitecores Admin Pipeline profiler. Also because the test web service is minimal code returning 'hello world'.
I of course deleted all the redirects the customer considered unnecessary, the remaining 700 redirects still have a delay of 1.2sec, this is (sort of) acceptable as a one time delay to load the webpage but its a big problem as a delay on web services, of which the site has many.
Is there some way to stop the redirects being triggered on Customer URLs? I tried patching my custom config to initialize the process before the redirect module but this had no effect on the delay. I can change the code myself but I would prefer an official answer to prevent accidental future overwrites.
Thanks!
The text was updated successfully, but these errors were encountered: