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

How to set header like this #1195

Closed
ericxin1982 opened this issue Dec 6, 2023 · 5 comments
Closed

How to set header like this #1195

ericxin1982 opened this issue Dec 6, 2023 · 5 comments

Comments

@ericxin1982
Copy link

Question

A clear and concise description of your question.

Hi @Badgerati

I want to make all html has no cache, and nginx it seems has this way, and how about pode?
image

Thanks
Eric Xin

@Badgerati
Copy link
Owner

Hi @ericxin1982,

Are you using Static Routes or normal Routes? In normal routes you can use Set-PodeHeader (https://badgerati.github.io/Pode/Tutorials/Headers/#setting-headers), and probably even set that in a global middleware as well.

@ericxin1982
Copy link
Author

I see, thanks.

@ericxin1982
Copy link
Author

Hi @Badgerati

Just wondering whether access static html file can be set to must provide jwt or api key.

Thanks
Eric xin

@ericxin1982 ericxin1982 reopened this Dec 9, 2023
@Badgerati
Copy link
Owner

Hi @ericxin1982,

If you're using Add-PodeStaticRoute to serve the static content then yes, this function can be supplied an -Authentication method to require JWT/API key.

If you're using the normal /public folder for static content then no, static content placed here is publicly available for all and you'll have to switch to using Add-PodeStaticRoute instead for anything that requires authentication.

@ericxin1982
Copy link
Author

Thanks.

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

No branches or pull requests

2 participants