• 0 Posts
  • 27 Comments
Joined 1 year ago
cake
Cake day: July 22nd, 2023

help-circle

  • There’s also the option of setting up a cloudflare tunnel and only exposing immich over that tunnel. The HTTPS certificate is handled by cloudflare and you’d need to use the cloudflare DNS name servers as your domains name servers.

    Note that the means cloudflare will proxy to you and essentially become a man-in-the-middle. You – HTTPS --> cloudflare --http–> homelab-immich. The connection between you and cloudflare could be encrypted as well, but cloudflare remains the man-in-the-middle and can see all data that passes by.





  • Lets get one thing straight.

    This is rarely ever the developer and more a business stakeholder forcing you to push the Friday deploy button.

    I’ve had somebody in the business escalating to my team lead, head of development and CIO because i flat out refused to deploy something on Friday at 16h.

    So no. This is not the developer making a hard choice. There should be somebody coercing or forcing him to push the deploy button.









  • Correct. The way I’m used to it ( and how I thought the world worked ) is that the IDE gives tab a fixed length or characters. If you set it to 4 it would be the equivalent of 4 spaces or 4 letters or whatever.

    If my tab is set to 4 it would take up the width of 4 characters. If I need two indentations I would press tab twice.

    If bob then checks out my code and calls me a maniac and sociopath for using indentation and swears by “2”, the code would just look more condensed. The alignment would still work out because that’s done through spaces.

    var user_name = "Bob"
    var user_age[tab]= "Bob"
    

    This would align the = for Bob, because it needs two characters to align and that’s what his tab width is. It wouldn’t align for me because my tab width is 4. So I would.pur two spaces instead of the . That way it is aligned for everybody regardless of their tab width settings.

    The way you explain it sounds like how tabs works in MS Word ( or other word processors ).

    I don’t think I could work like that. I’ve only ever used IDEs to code ( regardless of how primitive they were back when I started). Interesting take though :D


  • What I mean with tab = x spaces is only visually and not actually ( there will ( obviously) still be a tab character in my preference. Not sure if that was clear.

    Because alignment are fixed characters compared to indentation. For indentation the only question is how many characters the next indentation needs to be.

    For alignment it is not fixed. As an example of PHP code:

    function test(&obj) {
    $obj->doSomething()
    ....->doSomethingElse()
    }
    
    

    The dots would be spaces because in IDEs people generally use a font where every character is equally wide.

    If I would tab again instead of spaces it could work out if my tab length display is ( for one or more ) adds up to the width of the variable $obj. If somebody else has a tab width of 2 rather than somebody who has 3. It would only align for one of the two people.

    Does make sense? I typed it out after a gym session on my phone.

    Additionally. The whole problem is resolved by using spaces for both alignment and indentation. But in the cursor would still jump one space at a time rather than the whole tab ( although there are keyboard shortcuts for jumping words which would jump all of em.

    I don’t know. Call me old fashioned. I like what I like :/


  • fluckx@lemmy.worldtoProgrammer Humor@programming.devwait what
    link
    fedilink
    arrow-up
    58
    arrow-down
    3
    ·
    edit-2
    4 months ago

    Honestly I always preferred tabs for indentation and spaces for aligning. It doesn’t break anyone’s experience. And if somebody wants two spaces for a two-space-tab-width for indentation and other people prefer four. That will work just fine.

    I hate seeing 2 space indents. Unreadable AF ( to me ). At least this way I can easily work in the same codebase without somebody being annoyed ( except for the crying about the tabs )



  • It’s looping back to itself? Location header is pointing back to itself.

    Is it possible your backend is sending back an http 301 redirect back to caddy, which forwards it to your browser?

    Possibly some old configuration on your backend from the letsencrypt beforehand? Can you check the logs from your backend and see what they’re sending back?

    I’m assuming the request might replace the host with the IP on your reverse Proxy and that your next cloud backend is replying with a redirect to https://nextcloud.domain.com:443

    Edit: I think this is the most incoherent message I wrote to date.

    I think your reverse Proxy is forwarding the request to your next cloud, but replacing the Host header with the IP you specified as reverse Proxy. As a result the request arrives at your next cloud with the IP as “host”.

    Your next cloud installation is then sending back a 301 redirect to tell the client that they should connect to https://nextcloud.domain.com. this arrives through caddy at your browser, goes through the same loop until you’ve reached the max redirects.

    Have a look at your next cloud backend http logs to see what requests are arriving there and what HOST( http header ) it’s trying to connect to on that IP.