fractal-code / meteor-azure

Automate Meteor deployments on Azure App Service
MIT License
67 stars 20 forks source link

main.js added to url with force ssl rule #11

Closed ManuelDeLeon closed 8 years ago

ManuelDeLeon commented 8 years ago

Using the latest script. When I add the following force SSL rule, it adds /main.js to the url when I navigate to the root of the site and I get the error too many redirects.

<rule name="Redirect to HTTPS" stopProcessing="true">
  <match url="(.*)" />
  <conditions>
    <add input="{HTTPS}" pattern="^OFF$" />
  </conditions>
   <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" redirectType="Permanent" />
</rule>

Any clues?

ramijarrar commented 8 years ago

Can you confirm that you're not using the force-ssl package (check .versions for implicit dependencies)?

ManuelDeLeon commented 8 years ago

I'll double check.

ManuelDeLeon commented 8 years ago

Nope, no force-ssl references anywhere.

ramijarrar commented 8 years ago

Okay - are you making any other adjustments to the standard web.config?

ManuelDeLeon commented 8 years ago

Nope

On Nov 21, 2016 3:45 PM, "ramijarrar" notifications@github.com wrote:

Okay - are you making any other adjustments to the standard web.config?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/talos-code/meteor-azure/issues/11#issuecomment-262091590, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31oi_bBNYvey6lLljJNSGPHdiFcjJks5rAh7zgaJpZM4K4fu6 .

ramijarrar commented 8 years ago

Your web.config should look like this: https://raw.githubusercontent.com/talos-code/meteor-azure-example/master/.config/azure/web.config

And your ROOT_URL need to be written with the https protocol.

ramijarrar commented 8 years ago

I suspect you may have added the rule at the end (which would explain the routing to /main.js).

ManuelDeLeon commented 8 years ago

Yes, I added it to the end. I'll test it right when I get home.

It should be in the Readme =)

On Nov 21, 2016 3:53 PM, "ramijarrar" notifications@github.com wrote:

I suspect you have added the rule at the end (which would explain the routing to /main.js).

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/talos-code/meteor-azure/issues/11#issuecomment-262093545, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31lph1FILHKcCPeunZuCIKaAKCD_Xks5rAiDvgaJpZM4K4fu6 .

ManuelDeLeon commented 8 years ago

I copied that web.config and it deployed correctly but now the site is down: redirected you too many times.

ramijarrar commented 8 years ago

Can you try visiting the URL using "https" directly? Does that work properly?

ManuelDeLeon commented 8 years ago

Same message

ramijarrar commented 8 years ago

Can you try in a different browser?

ManuelDeLeon commented 8 years ago

tried it with Chrome and Edge

ramijarrar commented 8 years ago

Still not working?

ManuelDeLeon commented 8 years ago

Nope

On Nov 21, 2016 5:04 PM, "ramijarrar" notifications@github.com wrote:

Still not working?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/talos-code/meteor-azure/issues/11#issuecomment-262107422, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31iIll5VzdJGhy7mwEbw-0qn-Rzkwks5rAjGZgaJpZM4K4fu6 .

ramijarrar commented 8 years ago

Can you provide the URL? (you can DM me on Meteor forums if you prefer)

ManuelDeLeon commented 8 years ago

Let me deploy it again.

On Nov 21, 2016 5:05 PM, "ramijarrar" notifications@github.com wrote:

Can you provide the URL?

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/talos-code/meteor-azure/issues/11#issuecomment-262107509, or mute the thread https://github.com/notifications/unsubscribe-auth/AED31qDMOtL_gTYDhzNezaA1B060VmNFks5rAjG5gaJpZM4K4fu6 .

ManuelDeLeon commented 8 years ago

Sorry for the late reply but deployments take more than 20mins so testing is really slow. It has to be a caching/dns issue with this laptop. I tried it on another computer and the site works fine now that the rule is on top.

Thanks for the help.

ramijarrar commented 8 years ago

I made a few improvements to the 'force https' instructions based on this issue, let me know if you think there is room for any further clarification.