Skip to content
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

/post routes don't seem to be protected by authentication #649

Open
Aosmiles opened this issue Jan 7, 2023 · 0 comments
Open

/post routes don't seem to be protected by authentication #649

Aosmiles opened this issue Jan 7, 2023 · 0 comments

Comments

@Aosmiles
Copy link

Aosmiles commented Jan 7, 2023

Only post/:id seems to be protected with authentication.

It is possible to use postman or thunder client to make requests to the /post endpoints without being logged in.

perhaps moving the ensureAuth to server.js as middleware before all post routes would fix it.

app.use("/", mainRoutes);
app.use("/post", ensureAuth, postRoutes);

maybe this is covered in the classes and I missed something though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant