21:10:30 ~copypaste hey __uguu__
21:10:36 __uguu__ ??
21:10:39 ~copypaste can you maybe help me with a nginx thing?
21:10:46 ~copypaste i am fixing your config, but i am stuck on mime types
21:10:48 ~copypaste :(
21:10:56 __uguu__ ticket?
21:11:01 ~copypaste ticket?
21:11:14 ~copypaste i haven't pushed to git yet
21:11:28 ~copypaste sigh, i guess i can just to show what i mean better than explaining
21:11:32 ~copypaste one min
21:13:31 __uguu__ how besides the comments was my nginx config broken?
21:17:42 ~copypaste see ... https://github.com/infinity-next/infinity-next/issues/116
21:17:47 ~copypaste perhaps not broken, but bad practices
[...]
21:25:47 __uguu__ copypaste: i'll try to get to it, that PR was mostly out of spite
21:26:04 __uguu__ :^)
[...]
22:59:09 ~copypaste all right __uguu__
22:59:14 ~copypaste i'd really appreciate your guidance with this
22:59:28 __uguu__ hm?
22:59:37 ~copypaste https://github.com/infinity-next/infinity-next/commit/07e45e8f8bb8617a23ac7b3a7f7cc3804f8b790b
22:59:57 ~copypaste you can see i uh, kind of gutted your work
23:00:42 ~copypaste i really need help with the MIME types
23:00:52 ~copypaste why can't i make it use the URI instead of the flie on the disk :(
23:01:05 ~copypaste cc n-tech
23:02:00 n-tech make a stackoverflow post
23:02:12 __uguu__ this is why i used alias
23:02:28 ~copypaste i read and read, i don't even get what alias does...
23:02:34 ~copypaste would it fix this?
23:02:40 ~copypaste it doesn't seem to work with `try_files`
23:03:28 ~copypaste i have another way to fix it, but perhaps too radical
23:03:35 ~copypaste it is, to recommend two virtual hosts for every user
23:03:42 ~copypaste media. and then regular...
23:03:45 ~copypaste that's fix it easy
23:04:25 __uguu__ (or you could include file extensions in the storage :^D)
23:04:58 ~copypaste thats another good idea
23:05:01 ~copypaste why aren't we doing it??
23:05:10 ~copypaste only n-tech knows
23:05:13 __uguu__ because josh threw a fit when i suggested
23:05:15 __uguu__ :^)
23:05:16 n-tech then fucking change it
23:05:19 n-tech i don't give a shit
23:05:25 n-tech you have to know the extension to get the file then
23:05:28 n-tech you can't just ask for the hash
23:05:38 __uguu__ you can ask for just the hash
23:06:06 ~copypaste can we make the name with extension be a link to the hash?
23:06:09 ~copypaste i like this approach ...
23:06:25 n-tech how does that help? are you going to create a symlink for literally every single repiition of an attachment?
23:06:26 __uguu__ a symlink could work
23:06:27 ~copypaste so, aaa.jpeg would be a symbolic link to aaa
23:06:34 n-tech are you also going to write the code to remove those symlinks
23:06:41 n-tech or are we going to have 3 billion of them in a week
23:06:41 ~copypaste why remove them?
23:06:42 __uguu__ but like, symlink nfs hell
23:06:44 ~copypaste keep forever
23:06:56 n-tech so you want symlinks going to dead files?
23:07:00 ~copypaste oh
23:07:01 n-tech because you demanded I remove the files
23:07:04 ~copypaste ;_;
23:07:05 ~copypaste i wish
23:07:08 ~copypaste i wish i could just
23:07:12 ~copypaste mime type based on uri
23:07:13 ~copypaste ;_;
23:07:17 ~copypaste why can't i mime type based on uri
23:07:19 n-tech there has to be a way
23:07:30 __uguu__ you can use fucky if statements
23:07:36 ~copypaste no more if statements
23:07:36 __uguu__ with rewrite rules
23:07:37 ~copypaste they're buggy
23:07:57 __uguu__ okay, rewrite rules for each mime type
23:08:00 ~copypaste this config is so clean
23:08:10 ~copypaste i wish there was a directive
23:08:18 ~copypaste mime_uri;
23:08:20 ~copypaste that's it
23:08:21 __uguu__ hmm
23:08:25 n-tech So what's the actual crux of the issue? Right now, all files have no mimetype and download as an attachment?
23:08:33 ~copypaste yes n-tech that's right
23:08:38 ~copypaste but auto-expanding still works
23:08:41 ~copypaste as does display ofc
23:08:58 ~copypaste its just when you try open img in new tab
23:09:00 ~copypaste not working
23:09:13 ~copypaste wants to d/l
23:09:20 ~copypaste because octet-stream
23:09:36 __uguu__ would this help? http://nginx.org/en/docs/http/ngx_http_headers_module.html
23:10:06 ~copypaste well...
23:10:11 ~copypaste i tried a few add_header already
23:10:19 ~copypaste yes, i can change it to a constant, e.g. always image/jpeg
23:10:22 ~copypaste but that's wrong...
23:10:26 ~copypaste maybe i could do a map { }
23:10:33 ~copypaste but it feels wrong not to use nginx builtin types { }
23:10:34 __uguu__ yeah i was thinking map
23:10:35 ~copypaste to me...
23:10:47 __uguu__ hm
23:11:00 ~copypaste i think i should write an nginx module, to be quite honest...
23:11:04 ~copypaste lol
23:11:05 n-tech There's a way to use PHP to tell the webserver what to do
23:11:15 n-tech instead of using PHP to handle the actual content
23:11:21 n-tech it basically acts as a webserver in that instance
23:11:28 ~copypaste ?
23:11:40 n-tech i forgot the name, uguu knows though
23:12:10 n-tech http://idiallo.com/blog/making-php-as-fast-as-nginx-or-apache
23:12:13 n-tech Also supported with Nginx
23:12:13 n-tech The only difference with Nginx is the name of the header you send: X-Accel-Redirect.
23:12:17 n-tech this thing
23:12:33 n-tech ofc this generates a PHP process for files BUT
23:12:43 n-tech we can also support pw boards and staff boards with it
23:12:45 n-tech and even protect files