본문 바로가기

Development

Spring MimeMessageHelper attachment filename encoding System.setProperty("mail.mime.splitlongparameters", "false"); MimeMessage message = sender.createMimeMessage(); MimeMessageHelper helper = new MimeMessageHelper(message, true, "UTF-8"); // Your email content helper.setFrom("..."); helper.setTo("..."); helper.setSubject("..."); helper.setText("..."); helper.addAttachment( MimeUtility.encodeWord(attachmentFilename), attachmentConten 더보기
How do I redirect HTTP traffic on my server to HTTPS on my load balancer? AWS 에서 Load Balancer를 이용할 때 내부에서는 80포트 이지만 Load Balancer로 433포트로만 받고 싶을 경우에사용하는 방법이다. ==IssueI am using both HTTP and HTTPS listeners on my Elastic Load Balancing (ELB) load balancer. The ELB is offloading SSL, and the backend is listening only on a single HTTP port (HTTPS to HTTP). I want all traffic coming to my web server on port 80 to be redirected to HTTPS port 443, but I don’t want to chan.. 더보기
Redirect from HTTP to HTTPS and viceversa with Apache ProxyPass AWS의 무료 SSL 인증서를 사용하다보니 아래와 비슷한 상황이 발생하였다. AWS 의 무료 SSL은 Load Balancer 와 Cloud Front으로만 제공해주기 때문이다. (본인의 경우 Client Https Request => Load Balancer(Http) => API(Https)) 해결방법 1. EC2 에서 sudo yum install -y mod24_ssl 명령으로 설치2. 아래의 예시 참고 3456789101112 NameVirtualHost *:80 ServerName mysite.com SSLProxyEngine On RequestHeader set Front-End-Https "On" CacheDisable * ProxyPass /myapp https://tomcat-host:.. 더보기
React에 XLSX & Webpack 설정 참고 : https://github.com/SheetJS/js-xlsx/issues/285 module.exports = { // (...) plugins: [ // (...) new webpack.IgnorePlugin(/cptable/) ], node: { fs: "empty" }, externals: [ { "./cptable": "var cptable", "./jszip": "jszip" } ] }; 더보기
failed to require onload script npm-autoinit/autoinit npm WARN onload-script failed to require onload script npm-autoinit/autoinitnpm WARN onload-script Error: Cannot find module 'npm-autoinit/autoinit'npm WARN onload-script at Function.Module._resolveFilename (module.js:440:15)npm WARN onload-script at Function.Module._load (module.js:388:25)npm WARN onload-script at Module.require (module.js:468:17)npm WARN onload-script at require (internal/modu.. 더보기
Node 버전 스위칭 하기 NVM을 활용해서 node.js의 개발 버전을 자유롭게 변경이 가능하다. https://michael-kuehnel.de/node.js/2015/09/08/using-vm-to-switch-node-versions.html 더보기
[Jenkins] Running Jenkins on Port 80 or 443 using iptables https://wiki.jenkins-ci.org/display/JENKINS/Running+Jenkins+on+Port+80+or+443+using+iptables 젠킨스 80 포트 더보기
MongoDB Restore mongorestore -d [your_db_name] [your_dump_dir] 더보기
mysqldump Dumpmysqldump -h "$HOST" -u "$USER" --port='3306' --password="$PASSWORD" "$DATABASE" > $FILE_NAME Importmysql -u USER -p DATABASE 더보기
Classpath entry org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER will not be exported or published. Runtime ClassNotFoundExceptions may result. Open the properties of the project that generates this warning Click on “Java Build Path” Click on the tab “Order and Export” Enable “Maven Dependencies” Click on “Ok” Open the “Problems” view Select the warning we are trying to solve, and press “Ctrl-1″ Click on “Ok” 더보기