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

Not working on DEV on network devices #447

Open
moshetanzer opened this issue May 9, 2024 · 5 comments · Fixed by #456 · May be fixed by #448
Open

Not working on DEV on network devices #447

moshetanzer opened this issue May 9, 2024 · 5 comments · Fixed by #456 · May be fixed by #448
Assignees
Labels
question Further information is requested

Comments

@moshetanzer
Copy link

Hi,

Thanks for this great library. I have come across an issue where when I add --host to give dev server network address - the website displays without any styling on all devices connected to network address.

What is the best way to solve this just for dev.

Thanks

@moshetanzer moshetanzer added the question Further information is requested label May 9, 2024
@vejja
Copy link
Collaborator

vejja commented May 9, 2024

Hi @moshetanzer

This could be related to the default security setup for ‘upgrade-insecure-requests’ when serving with —host without a secure SSL connection

Can you try our recommended setup for —host at https://nuxt-security.vercel.app/documentation/advanced/faq#running-app-with-host-flag
And let us know if this works for you ?

@moshetanzer
Copy link
Author

Hi, Yes thanks this worked better than just using the --https flag.

Thank you.

Shouldnt cors handler * be set only for dev to all?

@moshetanzer
Copy link
Author

Also when using strictTransportSecurity true - nuxt.config.ts type is wrong since it expects false
https://github.com/Baroshem/nuxt-security/blob/8305b48079dc7c0ef83a16d3f6de24dfc41e563b/src/types/headers.ts#L237C1-L238C1

@Baroshem
Copy link
Owner

Baroshem commented May 10, 2024

Shouldnt cors handler * be set only for dev to all?

With all the settings we usually prefer to have it the same for all environments to avoid situations where something will pass on dev environment and will fail on prod environment. This is shipped by us as a good practise but you can always customize it to work only on certain environment the way you want :)

Also, thanks for the kind words! We are happy that you like the module :)

@Baroshem
Copy link
Owner

Also when using strictTransportSecurity true - nuxt.config.ts type is wrong since it expects false https://github.com/Baroshem/nuxt-security/blob/8305b48079dc7c0ef83a16d3f6de24dfc41e563b/src/types/headers.ts#L237C1-L238C1

I think you are correct. Could you please create a new issue with it? I think it is related to the documentation only as we changed it some time ago from accepting boolean values to only accept Object / false.

And if you would be interested in contributing, we would be very happy to help you with your first PR :)

@vejja vejja self-assigned this May 21, 2024
@vejja vejja linked a pull request May 21, 2024 that will close this issue
6 tasks
@Baroshem Baroshem linked a pull request May 22, 2024 that will close this issue
6 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
3 participants