6

When I add the secure: always parameter in app.yaml, I am still not redirected to a https. Https works when I type it in manually, and I'm testing this on the live server, but it treats the website as though secure: always isn't there.

I eventually just tried to map it to all the handlers in the yaml file, but it still has no effect.

    application: appname
    version: 1
    runtime: python27
    api_version: 1
    threadsafe: yes
    
    handlers:
    - url: /favicon\.ico
      static_files: favicon.ico
      upload: favicon\.ico
      secure: always
    
    - url: /css
      static_dir: css
      secure: always
    
    - url: /fonts
      static_dir: fonts
      secure: always
    
    - url: /js
      static_dir: js
      secure: always
    
    - url: /img
      static_dir: img
      secure: always
    
    - url: .*
      script: main.app
      secure: always
    
    libraries:
    - name: webapp2
      version: "2.5.2"
    
    - name: jinja2
      version: "2.6"
    
    error_handlers:
    
    - file: default_error.html
Vicky
  • 49
  • 6
  • Are you using a custom domain, rather than an appspot.com domain? – Gary Kerr May 09 '13 at 19:14
  • yes, but I have tried both the regular and appspot.com url's (neither give the redirect unless it is manually entered). I also do not get any 403 errors like other people report when using custom domains. – user2367576 May 09 '13 at 19:15
  • 1
    Are you trying in production? Works fine for me. secure: doesn't do anything for me on the dev_appserver though. I'd check for odd problems like the use of spaces in your yaml file, or maybe you're not actually uploading the yaml file you think... or you're testing the wrong version of your app, that doesn't match the yaml you thought you uploaded. – dragonx May 09 '13 at 21:21
  • wow, thank-you! I used a tab as indentation instead of two spaces. Everything works now. – user2367576 May 09 '13 at 21:32
  • 3
    You've solved your problem. Please add an answer and accept it to close the question. – Gary Kerr May 10 '13 at 20:11

0 Answers0