FAQ
In docs, there is a configuration which require users to log in to access
some URI :
https://developers.google.com/appengine/docs/python/config/appconfig#Requiring_Login_or_Administrator_Status
It is supposed to work in go, right? It does not in my code:
- url: /Register/.*
script: _go_app
login: required

- url: /.*
script: _go_app

I have a standard link on main page (served from /.*) and handler serving
/Register is in same place. Could be this a problem? Is it not securing
URI, but file locations in fact?

--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Search Discussions

  • Andrew Gerrand at Mar 17, 2013 at 8:01 am

    On 15 March 2013 20:48, Adam Sobotka wrote:

    I have a standard link on main page (served from /.*) and handler serving
    /Register is in same place. Could be this a problem? Is it not securing
    URI, but file locations in fact?

    This expression

    - url : /Register/.*

    will match the paths

    /Register/
    /Register/foo

    but not

    /Register

    which will be matched by the unsecured catch-all rule

    - url: /.*

    instead.

    If you want to secure these paths

    /Register
    /Register/
    /Register/foo

    then use this expression

    - url: /Register(|/.*)

    (which, expanding the brackets, gives two expressions:

    /Register
    /Register/.*

    ).

    Hope this helps explain what's going on.

    Andrew

    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.
  • Adam Sobotka at Mar 20, 2013 at 7:11 am
    Thank you Andrew, that totally explains what was going on. I didn't know
    that path is a regex value (I was wondering why there is a dot at the end,
    but light didn't made it through the veins :-)
    On Sunday, 17 March 2013 09:01:07 UTC+1, Andrew Gerrand wrote:


    On 15 March 2013 20:48, Adam Sobotka <vorci...@gmail.com <javascript:>>wrote:
    I have a standard link on main page (served from /.*) and handler serving
    /Register is in same place. Could be this a problem? Is it not securing
    URI, but file locations in fact?

    This expression

    - url : /Register/.*

    will match the paths

    /Register/
    /Register/foo

    but not

    /Register

    which will be matched by the unsecured catch-all rule

    - url: /.*

    instead.

    If you want to secure these paths

    /Register
    /Register/
    /Register/foo

    then use this expression

    - url: /Register(|/.*)

    (which, expanding the brackets, gives two expressions:

    /Register
    /Register/.*

    ).

    Hope this helps explain what's going on.

    Andrew
    --
    You received this message because you are subscribed to the Google Groups "golang-nuts" group.
    To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
    For more options, visit https://groups.google.com/groups/opt_out.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupgolang-nuts @
categoriesgo
postedMar 15, '13 at 9:48a
activeMar 20, '13 at 7:11a
posts3
users2
websitegolang.org

2 users in discussion

Adam Sobotka: 2 posts Andrew Gerrand: 1 post

People

Translate

site design / logo © 2022 Grokbase