Skip to content
Discussion options

You must be logged in to vote

I think that instead of using cookies for setting basename, you should configure nginx to set a header that Remix uses.

I never understood the need for cookies, as the basename is a server concern and not something the client should tell the server, which is what cookies are. The nice thing about the header is that it's only added by the proxy->remix path, so the client doesn't even know (or care).

# nginx.conf
server {
  listen 8000;

  location /shop {
    proxy_set_header x-remix-basename "/shop";
    proxy_pass http://host.docker.internal:3000/shop;
  }
  location /__remix__ {
    proxy_pass http://host.docker.internal:3000/__remix__;
  }
  location / {
    proxy_set_header x-remix-ba…

Replies: 2 comments 14 replies

Comment options

You must be logged in to vote
14 replies
@wesleygrimes
Comment options

@kiliman
Comment options

@wesleygrimes
Comment options

@kiliman
Comment options

Answer selected by wesleygrimes
@wesleygrimes
Comment options

@wesleygrimes
Comment options

@wesleygrimes
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants