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

allow localhost as domain for http #2903

Conversation

niccokunzmann
Copy link
Contributor

Questions:

@shields-ci
Copy link

shields-ci commented Feb 2, 2019

Messages
📖 ✨ Thanks for your contribution to Shields, @niccokunzmann!

Generated by 🚫 dangerJS against 7a8c1b9

@paulmelnikow
Copy link
Member

Hi! Thanks for picking this up.

Since this feature is targeting development and self-hosting, instead of adding code to specifically allow certain hosts, it would be better to add a config option, something like allowUnsecuredRequests: true which turns off the safety check: #2891 (comment)

As far as testing, what I'd suggest is to set allowUnsecuredRequests: false in the test config, and include service tests that establish that https works and http does not. Then break out the conditional requesting / error throwing into a function that can have its own .spec.js tests.

@paulmelnikow paulmelnikow added service-badge Accepted and actionable changes, features, and bugs developer-experience Dev tooling, test framework, and CI self-hosting Discussion, problems, features, and documentation related to self-hosting Shields labels Feb 2, 2019
@paulmelnikow
Copy link
Member

@niccokunzmann As discussed above this needs a bit of reworking. Feel free to open a new PR when you're ready!

@niccokunzmann
Copy link
Contributor Author

niccokunzmann commented Feb 8, 2019 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Dev tooling, test framework, and CI self-hosting Discussion, problems, features, and documentation related to self-hosting Shields service-badge Accepted and actionable changes, features, and bugs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

endpoint.svg requires https for localhost
3 participants