-
Notifications
You must be signed in to change notification settings - Fork 40
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
cdnify ignores paths in base URL #18
Comments
This is a major problem for us +1 |
@Climax777 and @billpatrianakos I created a PR for the fix. It's linked above. |
That's awesome. Thanks, @kirkhoff I think I might start using your fork until its officially merged. Thanks again! |
👍 on this issue for us, we need this for our deployment |
Does this still happen with the latest master? |
I've not used it since reporting the issue. I haven't seen any word on an official fix yet. I guess the best way to find out is to try and see. |
We switched to |
I don't believe the fix I put in was ever merged. @callumlocke any chance we could have this added? I referenced my PR above. |
Well the url fix is added. Otherwise make clear pull requests with one feature per change and CC me. Also make sure you add a test for the failing cases.
|
@XhmikosR this is what I was referring to. If it's fixed, then 👍 |
This does not seem to be fixed on version 1.0.2 |
This actually works as expected, my CDN url in the |
@albogdano: Then we'll need a clear test case. |
Ok, so I had the same problem but after investigating the issue it turns out the behavior of <a href="/img/whatever/icon.png"> points to the root folder so it becomes <a href="http://my.cdn.com/img/whatever/icon.png"> even if you set CDN URL to be The solution is to either remove the slash from the beginning of your relative URLs, or have an option that tells this module to remove these slashes for you. I think this should be closed. |
I'm having an issue where if my CDN URL contains a path like in the example (
/stuff/
) the URLs in the generated files do have the CDN URL prepended to them but they're missing the path. This is happening on images using root-relative paths.My config looks like this:
The generated URLs end up as
http://my.cdn.com/img/whatever
, missing the/marketing
part. I made sure there were no other tasks doing work before or after CDNify that would interfere.Right now I only notice it on images because they're the only thing referencing external assets in my project (I'm building a bunch of HTML emails).
Any ideas what could be wrong? For now my workaround is to use the rewriter function and match to any path where
indexOf('/img') === 0
but that won't work when assets aren't root-relative and its more than just images to worry about.The text was updated successfully, but these errors were encountered: