[erlang-questions] configure http methods in yaws

Steve Vinoski vinoski@REDACTED
Sun Jun 28 03:51:26 CEST 2015


On Sat, Jun 27, 2015 at 4:58 AM, Bogdan Andu <bog495@REDACTED> wrote:

> Hi,
>
> About yaws as reverse proxy..
>
> I want to use yaws as a reverse proxy in a
> http -> http setup. no ssl involved whatsoever.
>
> I am interested in interception module where I want
> to apply various checks on headers, query string, etc
> making this some kind of www firewall .
>
> Is this feature of yaws production ready ?
>

Yes. You can find details about it in chapter 13 of
http://yaws.hyber.org/yaws.pdf, or under the revproxy section of
http://yaws.hyber.org/yman.yaws?page=yaws.conf .

--steve



>
>
> Thanks,
> Bogdan
>
>
> On Fri, Feb 13, 2015 at 6:14 PM, Steve Vinoski <vinoski@REDACTED> wrote:
>
>> I don't recall seeing Yaws users asking for this config feature in the
>> past, so it's unlikely we'll add it. But what you're asking for -- a
>> configuration point for methods -- would be implemented much as I've shown
>> in my previous emails, much like a dispatchmod. The dispatchmod is as early
>> in the request handling process as you can get after the formation of the
>> #arg{}. The dispatchmod code I provided requires less configuration than
>> what you're showing, even for the default case, plus if having to have a
>> new module concerns you, the dispatch/1 function can be added to some other
>> existing module you already have instead.
>>
>> --steve
>>
>>
>>
>> On Fri, Feb 13, 2015 at 4:30 AM, Bogdan Andu <bog495@REDACTED> wrote:
>>
>>> Yes but the point is to have a default configuration that can be
>>> overridden by such a mechanism
>>> if one is configured.
>>> The 99 percent of cases only need a default behaviour.
>>>
>>> The way I see this is to have something like that (all in one):
>>>
>>> <LIMIT POST GET>
>>>         mod_405=my_405_handle_module
>>> ....
>>> </LIMIT>
>>>
>>> in this way we can also customize the response if a method other than
>>> GET or POST is sent to the server
>>>
>>> On Fri, Feb 13, 2015 at 10:17 AM, Imants Cekusins <imantc@REDACTED>
>>> wrote:
>>>
>>>> > Traffic with methods not allowed should be discarded with 405
>>>>
>>>> you see, someone else might prefer another action depending on method
>>>> not allowed.
>>>>
>>>> a dedicated attribute may be convenient but then someone would ask:
>>>> "how do I change the response code? how do I redirect?". Current
>>>> approach gives you choice.
>>>>
>>>> one of those cases when there is more than one approach, a prefers  A,
>>>> b prefers B. Both have a valid point.
>>>>
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150627/674c249b/attachment.htm>


More information about the erlang-questions mailing list