Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/main/java/com/squareup/pollexor/ThumborUrlBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,7 @@ public String toMeta() {

/** Build an unsafe version of the metadata URL. */
public String toMetaUnsafe() {
return host + assembleConfig(true);
return host + PREFIX_UNSAFE + assembleConfig(true);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ public class ThumborUrlBuilderTest {
}

@Test public void testBuildMeta() {
assertThat(unsafe.buildImage("a.com/b.png").toMeta()).startsWith("/meta/");
assertThat(unsafe.buildImage("a.com/b.png").toMeta()).startsWith("/unsafe/meta/");
}

@Test public void testSafeUrlCanStillBuildUnsafe() {
Expand All @@ -91,7 +91,7 @@ public class ThumborUrlBuilderTest {
}

@Test public void testSafeMetaUrlCanStillBuildUnsafe() {
String expected = "/meta/a.com/b.png";
String expected = "/unsafe/meta/a.com/b.png";
String actual = safe.buildImage("a.com/b.png").toMetaUnsafe();
assertThat(actual).isEqualTo(expected);
}
Expand Down