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
「/」がウザい / Take measures on the trailing slash i...
Search
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
Jun Kudo
September 25, 2021
Technology
400
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
「/」がウザい / Take measures on the trailing slash in WebApps
Japan Azure User Group 11周年イベント LT資料
WebAppsの「/」について解説とリダイレクトの対策
Jun Kudo
September 25, 2021
More Decks by Jun Kudo
See All by Jun Kudo
Azure AI Service を支えるAI Platform とはなんけ?
jkudo
0
49
Azure OpenAIのコンテンツフィルターを学ぶ
jkudo
0
2.1k
Azure Policyから始めるガバナンス
jkudo
0
850
5分で解るかもしれないMicrosoft Ignite 2023でのServerless関連アップデート
jkudo
0
620
第42回 Tokyo Jazug Night - ネットワークを伸ばせどこまでも
jkudo
0
660
Dynatrace デモ (Azure)
jkudo
0
730
Other Decks in Technology
See All in Technology
全社共通データ基盤をつくる。ソニーのDatabricks活用とデータガバナンス設計の裏側
sony
0
110
AI coding 整合正規方法
philipz
0
550
猫でもわかるKiro Web
kentapapa
1
120
技術的負債から考える、AI時代のエンジニアリング投資 — ビズリーチの技術的負債と向き合った経験から、変更し続けられるソフトウェアを考える/ technical-debt-con2026
visional_engineering_and_design
4
3.9k
【技術的負債conf】事業成長に伴う技術的負債の説明責任とAIによるモニタリング、認知的負債について
i35_267
4
2.3k
【Findyテック文化祭ワークショップ】新卒エンジニア&採用担当と作る、 なりたい姿と今やるべき一歩
dip_tech
PRO
0
110
行動するAIのためのオントロジー | DevRev — Encraft #26.pdf
dvrv_tknrszk
1
390
[Kiro Meetup #7] Kiro Crew Dive Deep
konippi
0
380
Coil3を内部実装から読み解く~キャッシュ戦略とAVIF画像の描画〜/nikkei-tech-talk50
nikkei_engineer_recruiting
0
110
Amazon Bedrock Agents ClassicからAmazon Bedrock AgentCoreへ移行した際、ガードレール設定が2箇所に割れた話
matsunobu
0
120
AIエージェントを安全で速い現場監督にする:Jev・Obsidian・メタハーネス
x5gtrn
PRO
0
130
Making AI Agents Safe and Fast- Jev, Obsidian, and the Meta-Harness
x5gtrn
PRO
0
150
Featured
See All Featured
We Have a Design System, Now What?
morganepeng
55
8.3k
Producing Creativity
orderedlist
PRO
348
41k
Design in an AI World
tapps
1
330
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
440
Joys of Absence: A Defence of Solitary Play
codingconduct
1
530
The Cost Of JavaScript in 2023
addyosmani
55
10k
Principles of Awesome APIs and How to Build Them.
keavy
128
18k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Code Reviewing Like a Champion
maltzj
528
40k
Code Review Best Practice
trishagee
74
20k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
690
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Transcript
「/」がウザい Jun Kudo
https://slash1.azurewebsites.net/folder/ と https://slash1.azurewebsites.net/folder は違う Web Apps
# curl -I https://slash1.azurewebsites.net/folder HTTP/1.1 301 Moved Permanently Content-Length: 163
Content-Type: text/html; charset=UTF-8 Location: https://slash1.azurewebsites.net/folder/ Server: Microsoft-IIS/10.0 X-Powered-By: ASP.NET # curl -I https://slash1.azurewebsites.net/folder/ HTTP/1.1 200 OK Content-Length: 0 Content-Type: text/html Accept-Ranges: bytes ETag: W/"8c40f6f16ab0d71:0" Server: Microsoft-IIS/10.0 X-Powered-By: ASP.NET 一部省略 一部省略
https://slash1.azurewebsites.net/folder/ (Trailing Slash) Web Apps はURL末の「/」がないとリダイレクトされる (Windowsのみ)
まぁ Web Apps を単体で 利用する場合には特に問題ない気がする
「何も表示されません!?」
バックエンドプール slash1.azurewebsites.net ドメイン www.server01.pw Application Gateway
②バックエンドプール https://slash1.azurewebsites.net/folder ③応答ヘッダー:Location https://slash1.azurewebsites.net/folder/ ①アクセス https://www.server01.pw/folder ④アクセス https://slash1.azurewebsites.net/folder/ アクセス制限 (AppGWのみ許可)
① ② ③ ④
# curl -I https://www.server01.pw/folder HTTP/1.1 301 Moved Permanently Content-Type: text/html;
charset=UTF-8 Content-Length: 167 Connection: keep-alive Location: https://slash1.azurewebsites.net:443/folder/ Server: Microsoft-IIS/10.0 X-Powered-By: ASP.NET 一部省略
対策例 リダイレクト URL を変更する (Locationヘッダーの書き換え) https://docs.microsoft.com/ja-jp/azure/application-gateway/rewrite-http-headers-url#modify-a-redirection-url
②バックエンドプール https://slash1.azurewebsites.net/folder ③応答ヘッダー:Location https://slash1.azurewebsites.net/folder/ ①アクセス https://www.server01.pw/folder ⑤アクセス https://www.server01.pw/folder/ ⑥バックエンドプール https://slash1.azurewebsites.net/folder/
④応答ヘッダー:Locationを書き換え https://www.server01.pw/folder/ ④ ③ ① ② ⑤ ⑥
# curl -I https://www.server01.pw/folder HTTP/1.1 301 Moved Permanently Content-Type: text/html;
charset=UTF-8 Content-Length: 167 Connection: keep-alive Location: https://www.server01.pw:443/folder/ Server: Microsoft-IIS/10.0 X-Powered-By: ASP.NET 一部省略
Application Gatewayの書き換えセットの作成 ヘッダー値: {http_resp_Location_1}://www.server01.pw{http_resp_Location_2} ④応答ヘッダー:Locationを書き換え https://www.server01.pw/folder/ ③応答ヘッダー:Location https://slash1.azurewebsites.net/folder/
「/」と仲良くしよう
私は、 工藤淳 Microsoft MVP for Azure Iret, inc. / cloudpack
@jkudo です。