1

If any launches my webpage build with angularjs using https, any urls used within the webpage should also be opened using https, instead of the default http.

Is that possible to force angularjs using either http or https depending on the initial request?

The embedded links are for example: <img href="my.dns.com/rest" /> without http or https in front. By default angulajrjs uses always http here.

2
  • href="//my.dns.com/rest". And, actually, it has no relation to angular Commented Dec 11, 2015 at 12:30
  • 1
    OK I see, thanks that works. Would you mind adding it as an answer so I can accept it? Commented Dec 11, 2015 at 12:35

1 Answer 1

2

Use protocol relative url. Like href="//my.dns.com/rest" so the scheme (http or https) will depend on source, from which web page loaded

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.