Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Basic認証の視覚化 / visualize basic authentication
Search
ozw
May 13, 2019
Technology
1.5k
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Basic認証の視覚化 / visualize basic authentication
ozw
May 13, 2019
Other Decks in Technology
See All in Technology
ダッシュボード"開発"について 〜使われるダッシュボードのつくりかた〜
kimichan
0
200
発表と総括 / Presentations and Summary
ks91
PRO
0
190
StepFunctionsとGraphRAGを活用した暗黙知活用のためのRAG基盤
yakumo
0
140
『モデル + ハーネス』で読み解く AIエージェント入門
oracle4engineer
PRO
2
170
文字起こし基盤の信頼性
abnoumaru
0
120
_NIKKEI_Tech_Talk__勉強会は熱量では続かない___17回続いた輪読会の設計術.pdf
_awache
2
110
探索・可視化・自動化を一本化 Amazon Quickでデータ活用スピードを上げる方法
koheiyoshikawa
0
170
インシデント事例と パッケージの全量解析に学ぶ ソフトウェアサプライチェーンの守り方 / supply-chain-attack-defense
flatt_security
0
900
Alphaモジュール使っていいのかい!?いけないのかい!?どっちなんだいっ!?
watany
1
320
Devsumi 2026 Summer 人もAIも使える共通基盤を事業の加速装置にする~デザインシステム運用に学ぶ組織レバレッジ~ 渡辺 凌央
legalontechnologies
PRO
1
290
AIコード生成×サプライチェーン攻撃 — PHPが直面する“二重の信頼問題
shinyasaita
0
460
2026年のソフトウェア開発を考える(2026/07版) / Agentic Software Engineering 2026-07 Findy Edition
twada
PRO
26
11k
Featured
See All Featured
Between Models and Reality
mayunak
4
380
Stewardship and Sustainability of Urban and Community Forests
pwiseman
0
380
Optimising Largest Contentful Paint
csswizardry
37
3.8k
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
250
Producing Creativity
orderedlist
PRO
348
40k
Automating Front-end Workflow
addyosmani
1370
210k
We Are The Robots
honzajavorek
0
280
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
880
What's in a price? How to price your products and services
michaelherold
247
13k
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
brightonSEO & MeasureFest 2025 - Christian Goodrich - Winning strategies for Black Friday CRO & PPC
cargoodrich
3
750
Accessibility Awareness
sabderemane
1
160
Transcript
#BTJDೝূͷՄࢹԽ P[X
લఏ ৽نϓϩδΣΫτ࡞࣌ #"4*$ೝূͰެ։อޢ ։ൃ࣌ *%18ͷೖྗ͕໘ͳͷͰϒϥβʹอଘ
લఏ ϦϦʔεલ #BTJDೝূΛղআɺ͍ͨͩͬͯΔҙ͕ࣝ ബΕ͍ͯΔͷͰղআΛΕͯ͠·͏͜ͱ ͕͋Δ
લఏ ϦϦʔεલ #BTJDೝূΛղআɺ͍ͨͩͬͯΔҙ͕ࣝ ബΕ͍ͯΔͷͰղআΛΕͯ͠·͏͜ͱ ͕͋Δ #"4*$ೝূΛ͍ͬͯΔ͜ͱΛ Εͳ͍Α͏ʹ͍ͨ͠
CBTJD@BVUI@NBSLHFN
CBTJD@BVUI@NBSLHFN w#"4*$ೝূ͕ઃఆ͞Ε͍ͯΔͱ(JUIVC SJCCPOΛදࣔͯ͘͠ΕΔ(FN w3BJMTFOWΛSJCCPOͰදࣔͯ͘͠ΕΔSBDL EFWNBSLHFNΛࢀߟʹ࡞
͍ํ # Gemfile gem 'basic_auth_mark' $ bundle install
͍ͬͯΔ͜ͱ w3BJMTBQQىಈ࣌ʹ3BDL.JEEMFXBSFʹ CBTJD@BVUI@NBSLΛՃ wSFRVFTU࣌ʹ#"4*$ೝূͷϔομ͕ೖͬͯ ͍ͨΒSJCCPOΛදࣔ
3BDLNJEEMFXBSF class Middleware1 def initialize(app) # app == Middleware2 @app
= app end def call(env) # Middleware2ͷcall͕ݺΕΔ. res = @app.call(env) # ඞཁʹԠͯ͡ॲཧΛߦ͏. res end end
ྫɿTFOUSZͰͷΘΕํ # sentry-raven def call(env) # ... begin response =
@app.call(env) rescue Error raise # Don't capture Raven errors rescue Exception => e Raven::Rack.capture_exception(e, env) raise end # ... response end
CBTJD@BVUI@NBSLͰͷ͍ํ def call(env) status, headers, response = @app.call(env) if basic_auth?
# </head> to <link rel="stylesheet" ...></head> # <body> to <body><div class="github-fork-ribbon" ...> new_response = insert_basic_auth_marks(response) # update body size. headers['Content-Length'] = new_response.bytesize.to_s response = [new_response] end [status, headers, response] end
#"4*$ೝূͷఆ SFRVFTUIFBEFS "VUIPSJ[BUJPO#BTJD\#BTFFODPEF JEQX ^ ͜ͷϔομ͕ϦΫΤετʹؚ·Ε͍ͯΔ߹ #"4*$ೝূ͋Γͱఆ
w αʔόʔଆͰ#"4*$ೝূΛͬͯΫϥΠΞϯτ ϒϥ β "VUIPSJ[BUJPOϔομΛૹΓଓ͚Δ w ࣮ࡍʹ#"4*$ೝূΛ͔ͨ͠Ͳ͏͔SBDLNJEEMFXBSFʹ Δใ͔ΒΘ͔Βͳ͍ ೝূʹޭͨ͠߹ͱೝূ͠
ͳ͔ͬͨ߹Ͱม͕ಉ͡ w ͳͷͰɺݱঢ়"VUIPSJ[BUJPO#BTJDϔομͷ༗ແͷΈͰ ఆ͍ͯ͠Δ αʔόʔͰೝূͬͨ͋ͱSJCCPO͕දࣔ ͞Εͯ͠·͏
ͱΓ͋͑ͣͷ ରԠࡦɹ $ISPNF DISPNFSFTUBSU DIPSNFϦελʔτͰ#"4*$ೝূͷΩϟογϡ͕ΫϦ Ξ͞ΕΔΑ͏ όʔδϣϯʹΑΔʁ 4BGBSJ
#"4*$ೝূΩϟογϡͷํ๏͕ݟ͚ͭΒΕͣɻɻ
͜Ε͔ΒΓ͍ͨ͜ͱ w ࠶ىಈΩϟγϡͷΫϦΞΛ͠ͳͯ͘#"4*$ೝূΛ ఆͰ͖ΔΑ͏ʹରԠ w ࣾϓϩμΫτͰͷར༻
͋Γ͕ͱ͏͍͟͝·ͨ͠