question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

StaticFile on symbolic link

See original GitHub issue

On Linux and http4s 1.0.0-M32 this line works StaticFile.fromPath(fs2.io.file.Path(s"/home/foo/index.html"), Some(req)).getOrElseF(NotFound()) but if the file is a symbolik link I see only 2 rows of html page on chrome, fireforx and curl. This problem there isn’t on http4s 0.21.33

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:9 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
armanbilgecommented, May 6, 2022

@gekomad thanks for all your help, I’ve PRed a fix in https://github.com/http4s/http4s/pull/6368.

1reaction
gekomadcommented, May 6, 2022

I created https://github.com/gekomad/http4s-test-symbolic-link Before run test it’s need create file and symlink with

yes "Some text" | head -n 1000 > /tmp/myfile.txt
ln -s /tmp/myfile.txt /tmp/link.txt

than

sbt test
Read more comments on GitHub >

github_iconTop Results From Across the Web

Ability to serve static content via symlink? · Issue #362 - GitHub
I created a symlink in this folder pointing to the folder that physically houses the static resources I would like to serve.
Read more >
FastAPI serving static files through symlinks - Stack Overflow
If I have a symlink pointing to a path outside the app folder, e.g. /home/xyz/app/main.py /home/xyz/app/index.html /home/xyz/app/public ...
Read more >
NGINX file server with symlinks - directory
This is a bit of a beginner question, but I'm trying to make Nginx serve a static file server that contains symlinked folders....
Read more >
Magento 2 : Symbolic links to pub/static files
When static file that you are looking for is not found, it redirects request to one folder above to static.php file, which initiates...
Read more >
A file of symbolic link path was showed 404 error.
I'm making web application by intelliJ IDEA. Then i would put uploaded static file on another disk(another partition or nas). So, I make......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found