| Django-SecDownload - ½ºÅ丮Áö LightTPDÀÇ mod_secdownload ¸ðµâÀ» ÅëÇØ ÆÄÀÏÀ» Á¦°øÇÏ´Â µ¥ »ç¿ëÇÒ ¼öÀÖ´Â Django ½ºÅ丮Áö ¹é¿£µå |
Áö±Ý ´Ù¿î·Îµå |
Django-SecDownload - ½ºÅ丮Áö ¼øÀ§ ¹× ¿ä¾à
- °Ô½ÃÀÚ À̸§:
- Ionel M?rie? Cristian
- °Ô½ÃÀÚ À¥»çÀÌÆ®:
- https://bitbucket.org/ionelmc/
Django-SecDownload - ½ºÅ丮Áö ű×
Django-SecDownload - ½ºÅ丮Áö ¼³¸í
lighttpdÀÇ mod_secdownload ¸ðµâÀ» ÅëÇØ ÆÄÀÏÀ» Á¦°øÇÏ´Â µ¥ »ç¿ëÇÒ ¼öÀÖ´Â Django ½ºÅ丮Áö ¹é¿£µå Django ½ºÅ丮Áö ¹é¿£µå´Â lighttpdÀÇ mod_secdownload ¸ðµâÀ» ÅëÇØ ÆÄÀÏÀ» Á¦°øÇÏ´Â µ¥ »ç¿ëÇÒ ¼ö ÀÖ½À´Ï´Ù. Django-SecDownload-Storage´Â Django ½ºÅ丮Áö ¹é¿£µåÀ̸ç, ÀûÀýÇÑ ¼¸í µÈ ´Ù¿î·Îµå URLÀ» »ý¼ºÇÏ´Â Reqular FilesystemStorageÀÇ È®ÀåÀÚÀÔ´Ï´Ù. PIP ¼³Ä¡ Django-SecDownload-Stolator : Easy_install Django-SecDownload-Storage - ¼Ò½º Checkout : HG Ŭ·Ð HTTPS : / /bitbucket.org/ionelmc/django-secdownload-storageCD Django-SecDownload- StoragePython Setup.py ¼³Ä¡ : Django ¸ðµ¨¿¡¼ sector = secdownloadFileSystemStorage ()¸¦ your secdownload.required ¼³Á¤À» ÅëÇØ ÀúÀåÇÏ´Â Çʵ忡 Ãß°¡ÇؾßÇÕ´Ï´Ù. sec_download_enabled = truesec_download_secret_key = 'veryverysecret'sec_download_media_url = media_url +'dl / '¿¹ : Import secdownload_storageClass foo (models.model) : secret_picture = models.ImageField (upload_to ='secret-pictures ', storage = secdownload_storage.secdownloadFileSystemStorage ()) mod_secdownload¸¦ È°¼ºÈÇؾßÇÕ´Ï´Ù ±×¸®°íÀÌ ±¸¼º°ú ºñ½ÁÇÑ ±¸¼ºÀÌ ÀÖ½À´Ï´Ù (ÀÚ¼¼ÇÑ Á¤º¸´Â http://redmine.lighttpd.net/wiki/1/docs:modsecdownload ÂüÁ¶) : secdownload.secret = "VE RyverySecret "secdownload.document-root ="path/to/media"secdownload.uri-prefix = "/dl/"secdownload.timeout = 3600Also, lighttpd ±¸¼º¿¡¼ ÇØ´ç ÆÄÀÏ¿¡ ´ëÇÑ ¾×¼¼½º¸¦ Çã¿ëÇÏÁö ¾Ê¾Æ¾ßÇÕ´Ï´Ù. ÀÏ¹Ý ¹Ìµð¾î ÆÄÀÏ°ú ÇÔ²² Á¦°øµË´Ï´Ù. ¿¹ : $ http = ~ "^ / media / secret-picture"{url.access-deny = ( "")} ±¸¼º - SEC_DOWNLOAD_ENABLED - FALSE·Î ¼³Á¤ÇÏ¿© URL ¼¸íÀ» ºñÈ°¼ºÈÇÏ°í FILESSTEMSTORAGE¿Í °°Àº ÆÄÀÏÀ» »ý¼ºÇÕ´Ï´Ù. ...¿¡ ÀÌ´Â °³¹ß¿¡ À¯¿ëÇÕ´Ï´Ù (DjangoÀÇ DevServer¸¦ »ç¿ëÇÏ´Â °æ¿ì) .- sec_download_secret_key - ÀÌ°ÍÀº sec_download_media_urlÀ» ¼¸íÇÏ´Â µ¥ »ç¿ëµÇ´Â ºñ¹Ð Å°ÀÔ´Ï´Ù. sec_download_enabled°¡ true·Î ¼³Á¤µÈ °æ¿ì media_url ´ë½Å »ç¿ëµÇ´Â Á¢µÎ»ç °æ·ÎÀÔ´Ï´Ù. sec_download_enabled°¡ false·Î ¼³Á¤µÈ °æ¿ì SecDownloadFileSystemStroage´Â Á¢µÎ»ç¿¡ ´ëÇØ media_urlÀ» »ç¿ëÇÕ´Ï´Ù. ¿ä±¸ »çÇ× : ¡¤ ÆÄÀ̽㠡¤ Àå°í
Django-SecDownload - ½ºÅ丮Áö °ü·Ã ¼ÒÇÁÆ®¿þ¾î