anchor.diff:              Port;
           Other ->
               list_to_integer(Other)
  +    end.
  +
  +https_redirection_hook(Req) ->
  +    {FwdProto, Req2} = cowboy_req:header(<<"x-forwarded-proto">>, Req),
  +    case FwdProto of
  +        <<"https">> -> Req2;
  +        _ -> io:fwrite("NOT HTTPS: ~p~n", [FwdProto]),
  +            {OrigUrl, Req3} = cowboy_req:url(Req),
  +            io:fwrite("OrigUrl: ~p~n", [OrigUrl]),
  +            TargetUrl = binary:replace(OrigUrl, <<"http://">>, <<"https://">>),
  +            io:fwrite("TargetUrl: ~p~n", [TargetUrl]),
  +            Req4 = cowboy_req:reply(301, [
  +                {<<"location">>, TargetUrl}
  +            ], Req3),
  +            Req4
       end.
positive.code: 
  init([]) ->
      case cowboy:start_http(http, 100, [{port, wf:config(n2o,port,port())}],
                                      [{env, [{dispatch, dispatch_rules()}]}]) of
          {ok, _} -> ok;
          {error,{{_,{_,_,{X,_}}},_}} -> io:format("Can't start Web Server: ~p\r\n",[X]), halt(abort,[]);
          X -> io:format("Unknown Error: ~p\r\n",[X]), halt(abort,[]) end,
  
negative.code:             {"/rest/:resource/:id", rest_cowboy, []},
              {"/ws/[...]", bullet_handler, [{handler, n2o_bullet}]},
              {'_', n2o_cowboy, []}
      ]}]).
  
  port() ->
      case os:getenv("PORT") of
  