Replies: 3 comments 2 replies
-
Hi @JimBobSquarePants, can you give some feedback please? |
Beta Was this translation helpful? Give feedback.
-
Sorry, I don't understand the need for intercept requests to external domains and why there's such a strong restriction on them. The Razor tag The only weakness I see is the HMAC key being unique regardless of the external server, but this isn't a problem for a unique media server. I noticed the limitation in the The suggested implementation seems too complex for my knowledge level, and would require forking the project. I understand the project wasn't architected to support a media server, but this is a very useful scenario and likely not unique to me. If the suggested change can't be done, I think I can manage working with URLs starting with Thank you for the help. I really like this project, it just needs this one point to be 100% perfect. :) |
Beta Was this translation helpful? Give feedback.
-
URLs beginning with The reason ASP.NET Core Middleware cannot intercept requests to external domains is because middleware operates within the web server environment, and its purpose is to handle and process requests that the server itself can manage. When a request is made to an external domain, it bypasses the server's control and goes directly to the external server. Here's a simple analogy to further clarify things. Think of your ASP.NET Core application as a well-secured building. The middleware acts like security guards inside this building, ensuring everything runs smoothly and securely. These guards can only monitor and control what happens within the building itself. When you make a request to an internal URL, it's like moving items within the building—the security guards can oversee and manage this. However, when you make a request to an external domain, it's like sending something out to another building entirely. The security guards in your building can no longer see or control what happens once it leaves their premises. This is why we explicitly filter external URLs and use the base resolution functionality to render them exactly how a standard
ImageSharp.Web is designed to handle centralized media servers, and the |
Beta Was this translation helpful? Give feedback.
-
I have 2 client websites that need to request images (with commands) from a media website.
I configured ImageSharp.Web on the client websites and also in the media website.
On the client websites, the ImageSharp.Web TagHelpers works well only if I use:
<img src="//mediadomain/image.jpg" imagesharp-width="100" ...>
(src
URL starting with//
, without usinghttp://
orhttps://
).Because ImageSharp.Web TagHelpers ignore the commands if the domain is different from the current website and the URL has the protocol.
I searched in the issues and found a related post, but the solution is not clear to me, at beginning I was expecting to have the
ImageSharpMiddlewareOptions.IgnoreHost
configuration, but it seems the implementation went another way related to the cache keys? Not sure if it fits what I need, or it's a different problem, and how to configure ImageSharp.Web, can someone help please?Note: in dev I also need ports on the url.
Beta Was this translation helpful? Give feedback.
All reactions