Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Basic認証の視覚化 / visualize basic authentication
Search
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
ozw
May 13, 2019
Technology
1.6k
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
実践! SRE × AI - ABEMA における AIOps -
tetsuya28
7
2.7k
初対面のメンバーがチームを組み、Claude Codeでゼロからサービスをリリース
mkdev10
1
120
実体験から学ぶ分析エージェントの開発と運⽤
recruitengineers
PRO
8
1.9k
Jetson Orin Nanoとk3sとローカルLLMで音声文字起こしシステム作ってみた
y_sera15
0
100
パッチ更新でterraform initが落ちた日
grimoh
1
110
AI時代のPRレビューにどう向き合うか?
kairim0
1
150
Essential architectural thinking (revised edition)
ufried
0
110
オブザーバビリティを高める AI エージェント体験を考える / Designing AI Agent Experiences That Enhance Observability
aoto
PRO
2
320
Codex概要
ymiya55
0
490
freeeらしさをAIとともに作る / Creating the freee Experience with AI
ymrl
0
220
Incremental HTTP
kazuho
5
2.1k
自主式軟體工廠
philipz
0
250
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
4k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
Utilizing Notion as your number one productivity tool
mfonobong
4
610
Tell your own story through comics
letsgokoyo
1
1.1k
Optimizing for Happiness
mojombo
378
71k
Practical Orchestrator
shlominoach
192
12k
It's Worth the Effort
3n
188
29k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
440
Speed Design
sergeychernyshev
33
2.1k
Darren the Foodie - Storyboard
khoart
PRO
4
4k
The Limits of Empathy - UXLibs8
cassininazir
2
710
Conquering PDFs: document understanding beyond plain text
inesmontani
PRO
4
3.2k
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 ࣾϓϩμΫτͰͷར༻
͋Γ͕ͱ͏͍͟͝·ͨ͠