Skip to content

Commit

Permalink
Fix frontend api client base url and add canary origin for cors.
Browse files Browse the repository at this point in the history
  • Loading branch information
Den4200 committed Jul 25, 2023
1 parent 48f66f5 commit 518b7a1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions portfolio_backend/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ fn run_migrations(rocket: Rocket) -> Result<Rocket, Rocket> {
fn create_cors() -> Cors {
let allowed_origins = AllowedOrigins::some_exact(&[
"https://dennispham.me",
"https://canary.dennispham.me",
"http://localhost:3000",
"http://127.0.0.1:3000",
]);
Expand Down
2 changes: 1 addition & 1 deletion portfolio_frontend/src/api.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import useEvent from "react-use-event-hook";
import type { ResponseData } from "./types";

const ApiClient = axios.create({
baseURL: "http://localhost:8000/api",
baseURL: "/api",
});

export const GITHUB_USERNAME = "Den4200";
Expand Down

0 comments on commit 518b7a1

Please sign in to comment.