Add CORS config and auth with JWT
This commit is contained in:
@@ -3,14 +3,10 @@ import { buildApiUrl } from "./url";
|
||||
|
||||
describe("buildApiUrl", () => {
|
||||
it("joins base url and relative path without duplicate slashes", () => {
|
||||
expect(buildApiUrl("/lok/open-hours")).toBe(
|
||||
"http://localhost:5013/lok/open-hours",
|
||||
);
|
||||
expect(buildApiUrl("/lok/open-hours")).toBe("/api/lok/open-hours");
|
||||
});
|
||||
|
||||
it("accepts path without leading slash", () => {
|
||||
expect(buildApiUrl("lok/open-hours/1")).toBe(
|
||||
"http://localhost:5013/lok/open-hours/1",
|
||||
);
|
||||
expect(buildApiUrl("lok/open-hours/1")).toBe("/api/lok/open-hours/1");
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user