Have there been any updates since? I'm finding myself wanting to both do a 
scheme and domain redirect (force HTTPS, always include or always omit the 
"www." prefix for the canonical domain). Because of this lack, I'm finding 
myself duplicating the same "BaseHandler" over and over again, and it's 
pretty ugly (since I don't want to do a sequence of redirects, but rather a 
single redirect that combines both).


On Tuesday, September 29, 2015 at 4:10:34 AM UTC-4, Alistair Burrowes wrote:
>
> Thanks I wasn't aware of that and that is really good to know. I will use 
> that when my site moves to https.
>
> However, I still think a PaaS style option should be available for domain 
> redirects. Perhaps in app.yaml as well. I think i'll create an issue in the 
> app engine issues tracker.
>
> On Tuesday, September 29, 2015 at 5:58:43 PM UTC+10, Luna Duclos wrote:
>>
>> In your app.yaml, you can use  "secure: always" to force the app to use 
>> https, this will redirect any and all requests to https without them 
>> hitting your app's code at all, does this seem what you're looking for ?
>>
>> On Tue, Sep 29, 2015 at 3:58 AM, Alistair Burrowes <alistair...@gmail.com
>> > wrote:
>>
>>> Hi,
>>>
>>> It seems like there is no good solution for setting up 301 redirects at 
>>> a domain level which is a common requirement of websites and should not 
>>> need to be handled by an instance. Existing options seem to be:
>>>
>>>    - Use modules and route via dispatch non-canonical domains. This 
>>>    doesn't appear to handle the case where you want to redirect http to 
>>> https 
>>>    for the canonical domain as I don't think you can use http vs https for 
>>>    module routing. The solution in general also kind of sucks because you 
>>> rack 
>>>    up instance hours for a pretty trivial requirement.
>>>    - Pass all requests through some handler and check the domain etc. 
>>>    Not bad for dynamic content, but static requests don't hit your app 
>>> engine 
>>>    instance and you would need to force them to do so (avoiding the static 
>>>    content cdn) and have some ugly code that manually returns the static 
>>>    resource if the domain/scheme is all good.
>>>    - Have a separate cloud project that non-canonical domains are 
>>>    pointed to that just redirects requests. This is fine, however doesn't 
>>> work 
>>>    in the case that you want to redirect http to https since both must 
>>> point 
>>>    to the same cloud project.
>>>
>>> I would like a more PaaS option such as:
>>>
>>>    - Simple 301 redirects possible via a configuration file
>>>    - Simple 301 redirects possible via the cloud console
>>>
>>> Am I missing something? If not can a more PaaS option be provided?
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Google App Engine" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to google-appengi...@googlegroups.com.
>>> To post to this group, send email to google-a...@googlegroups.com.
>>> Visit this group at http://groups.google.com/group/google-appengine.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/google-appengine/833c4de0-9406-432d-8e67-d2e7a4b0715c%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/google-appengine/833c4de0-9406-432d-8e67-d2e7a4b0715c%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-appengine+unsubscr...@googlegroups.com.
To post to this group, send email to google-appengine@googlegroups.com.
Visit this group at https://groups.google.com/group/google-appengine.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-appengine/8e3f4667-6b6f-495c-93b4-93b41e19aeaa%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to